-
Notifications
You must be signed in to change notification settings - Fork 100
vagrant provision
with chef-solo fails with NFS and/or VMware Fusion as the mount breaks
#88
Comments
Yeah, I had this issue for several weeks now… sadly I can't provide more information, but I'm also hoping for a fix… |
Just bought the VMware provider today and was disappointed that I'm unable to use vagrant-berkshelf with it (even using |
@beaugunderson sadly I do not have a copy of the vmware provisioner. I'm pretty sure I have a copy of vmware fusion on my desk though. If @mitchellh want's to hook me up with the provisioner I could try to dig into this one! ;) |
@reset you can repro it also with Virtualbox using NFS. Just set |
pretty sure that these two issues are related: berkshelf/berkshelf#525 |
I use some rake taks to workaround this problem until its fixed |
Works for me, on OS X 10.9 with vagrant-vmware-fusion. To install, checkout this branch and run: bundle install bundle exec thor :build vagrant plugin uninstall vagrant-berkshelf vagrant plugin install pkg/vagrant-berkshelf-1.3.7.gem
Ran into this issue today as well. @wwestenbrink the link appears to point to a non-existent gist. Could you repaste? |
Just a note that Anyway, based on comments in berkshelf/berkshelf#525 it seems that Berkshelf unfortunately won't change it behavior, so vagrant-berkshelf should use a temp directory where it vendors the cookbooks, and then copies those into the synced directory. |
+1 on this, @tmatilai if you could expand on the details of your proposed fix, I could perhaps open up a PR |
berks install -p tmp_folder |
The badass ( 🐔 ) I am, I would maybe still first make a PR for Berkshelf:Berksfile#vendor to only require that the destination directory is empty (instead of non-existing), and modify it to install the cookbooks directly there without using tempdir. If that gets rejected, then vagrant-berkshelf should get a safe tempdir path (but delete the dir), rsync would be faster, but unfortunately it is not very portable (Windows, anyone?). |
@tmatilai it's fine for |
…ter branch.
Hi, |
My solution was to place config.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = "./chef/cookbooks"
end where the directory
I then |
For what it's worth, here's a hacky patch to get |
@phillipsnick no resolution yet, but I'm working on a rewrite of Vagrant Berkshelf soon(tm) |
Cool, if you need a beta tester let me know :) |
This is fixed now that 4.0.0 is released and we no longer delete the vendored Berkshelf directory. |
👍 |
Since installing 4.0.0 I haven't had any issues with the Thanks 👍 |
The
Install
action with the chef-solo provisioner causes the local "berkshelf" directory (i.e. the cookbook_path component) to be deleted and re-created. In the released versions that is done by Berkshelf, and in master by ourselves. NFS and HGFS mounts don't like this and are left in a non-functional state, at least with an OS X host and Debianoid guests. Surprisingly vboxsf seems to be fine with that, though.vagrant provision
then fails either when validating the mount (withtest -d
) or while running chef-solo.vagrant reload --provision
works as expected as it restarts the VM.The simplest setup to repro this is to have a Berksfile:
and Vagrantfile:
I don't know when this broke with the Fusion provider, as it definitely worked after #24. NFS might have had problems all the time. Dunno.
I'm not sure how to fix this. I don't know if it is possible to fix the mounts in a cross-FS/OS way. The best would probably be to avoid removing the local directory but that requires changes in Berkshelf, too.
Poking also @mitchellh hoping he has some good easy solution. =)
PS: Thanks for all the hard (FOSS) work!
The text was updated successfully, but these errors were encountered: