-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chef-solo provisioner fails with a CookbookNotFound error if a reboot occurs after vagrant up #119
Comments
This is similar, yet different than hashicorp/vagrant#1587 |
I hit this as well! I found that if you issue a "net use" command (with no additional arguments) that it seems to "wake up" the symbolic link. |
In my case, my Vagrantfile had a shell provisioner that would reboot the box so that a new host name would take effect. Later in the same Vagrantfile I had a chef provisioner, and the chef run would fail with a CookbookNotFound error. I added another shell provisioner to my Vagrantfile after the reboot but before the chef provisioner that issues a |
I've been playing with this fix locally in the chef-solo provisioner.: @machine.communicate.execute('& net use a-non-existant-share', :error_check => false) Sounds like you came up with the same solution 😄 I'd like to be able to have a single Vagrantfile with multiple provisioner blocks, some with reboots in between (we're talking about Windows here after all). |
Fixed in 1.2.3 |
Nice! I actually got on here to report what I had found and to make a case for dealing with this problem in vagrant-windows (even though this problem is not vagrant-windows' fault) and ended up finding that you had logged this issue. I'd love to see the plugin deal with this so we don't have to put workarounds in our vagrantfiles. A |
When I started writing my last comment, you had not yet closed the issue. Feel free to ignore. :) |
Cool. I just pushed the 1.2.3 gem. I'll try tweaking the syntax in a future release, thanks! |
sneal, I just upgraded and retested this with vagrant-windows 1.2.3. Here the steps I ran. Did this fix address the failure on vagrant up or do you have to run vagrant provision after vagrant up?
|
Ok, thanks for the follow up. |
The chef provisioner symbolic links are broken after a reboot until the user opens a share through Explorer. This makes it impossible to run multiple provisioners where one of the steps reboots the box.
Repro:
vagrant up --no-provision
vagrant provision
The text was updated successfully, but these errors were encountered: