Open ianmiell opened 6 years ago
Same issue here : working on Windows 7, vagrant 2.1.1, virtualbox 5.2.12r122591, box centos/7 : enabling landrush break the DNS, my shell provisionning break on yum unable to find mirrors.
@ianmiell is this still a re-producible problem for you? What are the steps to re-produce? Are you saying the problem is a CentOS host?
Which box and config are you using?
If memory serves I had the problem on ubuntu bionic (definitely) and centos/7 (I think), running on a base of ubuntu 18.04 (I think).
I'll try and check it tomorrow.
imiell@cage:~/tmp $ cat Vagrantfile
Vagrant.configure("2") do |config|
config.landrush.enabled = true
config.vm.define "chefserver" do |chefserver|
chefserver.vm.box = "ubuntu/bionic64"
end
end
imiell@cage:~/tmp $ uname -a
Linux cage 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
imiell@cage:~/tmp $ vagrant version
Installed Version: 2.2.0
Latest Version: 2.2.2
To upgrade to the latest version, visit the downloads page and
download and install the latest version of Vagrant from the URL
below:
https://www.vagrantup.com/downloads.html
If you're curious what changed in the latest release, view the
CHANGELOG below:
https://github.com/hashicorp/vagrant/blob/v2.2.2/CHANGELOG.md
repros the problem:
vagrant@ubuntu-bionic:~$ sudo su
root@ubuntu-bionic:/home/vagrant# apt update
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
centos/7 looks ok.
We've been running into the same issue on bento/ubuntu-18.04
. It seems to be related to a systemd + caching + name resolution failure bug discussed here:
https://moss.sh/name-resolution-issue-systemd-resolved/
By running this script in our Vagrantfile, we're able to prevent issues with the DNS resolution, but unfortunately this causes Landrush to fail when attempting to halt and then re-up a server (vagrant halt && vagrant up
). This makes our DNS stable and prevents lookup failures on the initial provisioning & boot, but unfortunately prevents a second "vagrant up" from running.
# update_resolver.sh
sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
ls -l /etc/resolv.conf
Relevant block from our Vagrantfile:
config.vm.provision :shell,
path: "./vagrant/scripts/update_resolver.sh",
run: "always"
config.landrush.enabled = true
config.landrush.upstream "8.8.8.8"
config.landrush.tld = "test"
config.landrush.host_ip_address = '192.168.99.99'
Here's where our vagrant up
breaks on a second attempt:
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Automatic installation for Landrush IP not enabled
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cat /etc/resolv.conf | grep ^nameserver
Stdout from the command:
Stderr from the command:
Running Vagrant 2.2.3, bento/ubuntu-18.04, landrush 1.3.1.
Hope this helps with further information/debugging.
logging in:
Not sure how to debug from here...?