devopsgroup-io / vagrant-hostmanager

:pencil: A Vagrant plugin that manages hosts files within a multi-machine environment.
Mozilla Public License 2.0
1.46k stars 146 forks source link

setting Stale/Ghost hosts attempts #151

Open jayunit100 opened 9 years ago

jayunit100 commented 9 years ago

When using vagrant openstack, I find that vagrant hostmanager reports that "machine with the name 12345-1 was not configured for this environment".

This is a fatal error .

However, those machines were deleted (using vagrant global-status --prune confirms this).

I've even grepped around for those particular machine names, and they are nowhere to be found.

Is there some hidden state somewhere that is caching machine names that i can reset?

possibly this is just an issue that vagrant openstack is providing machine names to the hostmanager and REST api calls are returning machines which no longer exist. But even so, i think hostmanager should be smart enough not to try to update a hosts file to include a machine that no longer is reachable.

jayunit100 commented 9 years ago

FYI rm -rf .vagrant/ seems to fix this. to reproduce the trick is to create a bunch of VMs that cannot be recreated (i.e. change the vagrantfile after you create them), and then run vagrant up. The result is that the last batch of created VMs won't be found, so hostmanager dies.