Closed Ilhicas closed 7 months ago
Would just like to add that the issue above doesn't happen on a Jenkins slave with the following characteristics:
Vagrant 1.9.1 vagrant-hostmanager (1.8.7) Docker version 18.03.0-ce, build 0520e24 Ubuntu : 16.04 Kernel: 4.13.0-1012-azure
This is a confirmed 2.+ issue Reverted to version 1.9.1 local machine and its working as expected. All other versions referred remain the same.
Is there any known workaround for this? I'm seeing this now since upgrading to Vagrant v2.1.1.
Last time I've dealt with the issue, no, the workaround was to revert vagrant version.
I'm on vagrant 2.1.1, and I'm seeing this on the VirtualBox provider.
Same issue with 1.8.9 and vagrant 2.1.2
Any updates ?
I don't think there will be any updates, unless someone inherits this repo, and keeps it alive, I don't have the time to create a Pull Request, that wouldn't be seen by the repo owners anyway.
A suggestion I would give you would be to add a Docker machine without SSH that grants you changes to the hostmanager.
An example project in docker that I use alongside molecule, as vagrant and docker for me are coming to an end, its just too painful to keep vagrant with docker. You could add a vm with docker provider with box nil and no ssh and add it to your stack. https://github.com/iamluc/docker-hostmanager
Here's a beatiful hack:
config.hostmanager.ip_resolver = proc do |vm, resolving_vm|
if vm.provider_name == :docker
id = vm.provider.to_s.split[1][1..-2]
if id != "ne" # aka. we have a valid id
nwInfo = vm.provider.driver.inspect_container(id)["NetworkSettings"]
nwInfo["IPAddress"]
end
end
end
Closing given this has been open for a long time without any updates
On Vagrant Versions : 2.0.1 | 2.0.2 | 2.0.3 With docker : Docker version 18.03.0-ce, build 0520e24 With vagrant-hostmanager: 1.8.7 OS: 16.04.1-Ubuntu Kernel: 4.13.0-37-generic Running only on docker provider , when doing
vagrant up machine-to-up
Results in /etc/hosts
This Vagrantfile has the following remapping enabled:
This is traversal to all other machines declared in this Vagrantfile
This same setup was working previously.
It's not working since update from vagrant 1.91 that was causing me other non-related issues, have also worked to my knowledge under 2.0.1 version, but have since updated to 2.0.2 (by OS update), and since it's not working.
Im currently running again under 2.0.1 without luck
Have also used version 2.0.3 without luck.
Expected to have the following /etc/hosts
The same issue is visible inside the guest container /etc/hosts resolving to 127.0.0.1