Plugin executed several times during vagrant execution as of Vagrant version 2.2.14
skukla opened this issue · comments
Upon updating to vagrant 2.2.14 and running a relevant vagrant command which adds hosts (up, provision, reload), I see that the "Checking for Hosts Entries" operation executes several times at different times during the process. Consider a machine which has a hostname luma.demo
and one alias, b2b.luma.demo
:
==> Kukla-Machine: [vagrant-hostsupdater] Writing the following entries to (/etc/hosts)
==> Kukla-Machine: [vagrant-hostsupdater] 192.168.57.12 luma.demo # VAGRANT: b0909dcb3cd2b4ce381f5e67253df7e4 (Kukla-Machine) / b977d2f2-196d-4126-84d8-287319c9cf82
==> Kukla-Machine: [vagrant-hostsupdater] 192.168.57.12 b2b.luma.demo # VAGRANT: b0909dcb3cd2b4ce381f5e67253df7e4 (Kukla-Machine) / b977d2f2-196d-4126-84d8-287319c9cf82
==> Kukla-Machine: [vagrant-hostsupdater] This operation requires administrative access. You may skip it by manually adding equivalent entries to the hosts file.
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: Setting hostname...
==> Kukla-Machine: Configuring and enabling network interfaces...
==> Kukla-Machine: Mounting shared folders...
Kukla-Machine: /vagrant => /Users/steve/Repositories/chef-vm-builder/app
Kukla-Machine: /tmp/vagrant-chef/2e8896bed40d5e23b8918bdb0645b887/roles => /Users/steve/Repositories/chef-vm-builder/app/roles
Kukla-Machine: /tmp/vagrant-chef/4847eb237c6608f62eeedf7d5e50171e/nodes => /Users/steve/Repositories/chef-vm-builder/app/nodes
Kukla-Machine: /tmp/vagrant-chef/c57acd1717291ee7fbbcc6bea632e620/cookbooks => /Users/steve/Repositories/chef-vm-builder/app/cookbooks
Kukla-Machine: /tmp/vagrant-chef/75cac5eba507dbedb2893badd80a45b5/environments => /Users/steve/Repositories/chef-vm-builder/app/environments
==> Kukla-Machine: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> Kukla-Machine: flag to force provisioning. Provisioners marked to run always will still run.
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] Checking for host entries
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 luma.demo
==> Kukla-Machine: [vagrant-hostsupdater] found entry for: 192.168.57.12 b2b.luma.demo
When digging for information on this issue, I found the following github issue which seems to be related: hashicorp/vagrant#12034
Problem is, it seems like this issue is considered "solved", which potentially leaves me in the lurch with the above problem.
My questions would be:
- Is this a known issue?
- If the above github thread from Vagrant IS the cause of this and the problem will not be solved, is there a workaround?
As of now, the only way I have seen to address this is to downgrade to 2.2.10 (since 2.2.11, 12, and 13 all have subsequent bugs and issues). I'd just like to confirm whether that's my only recourse at this point.
Thanks so much!
Same multiple apparent host updates here, with these:
Vagrant 2.2.14
VirtualBox 6.1.16r140961
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
ansible 2.10.3
config file = /Users/iain/bradford-abbas.uk/ansible.cfg
configured module search path = ['/Users/iain/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.10.4/libexec/lib/python3.9/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.9.1 (default, Dec 17 2020, 10:08:12) [Clang 12.0.0 (clang-1200.0.32.27)]
vagrant-auto_network (1.0.3, global)
- Version Constraint: > 0
vagrant-hostsupdater (1.2.0, global)
- Version Constraint: > 0
vagrant-vbguest (0.28.0, global)
- Version Constraint: > 0
Is this a known issue?
This looks like the same issue as described in #187.
If the above github thread from Vagrant IS the cause of this and the problem will not be solved, is there a workaround?
As far as I know there is no workaround yet. The maintainer is currently looking into it.
This one is definitely a dup of #187. I just provided the PR with the fix, see #187 (comment).