Skip to content
This repository was archived by the owner on Dec 26, 2017. It is now read-only.
This repository was archived by the owner on Dec 26, 2017. It is now read-only.

vagrant provision with chef-solo fails with NFS and/or VMware Fusion as the mount breaks #88

@tmatilai

Description

@tmatilai

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 (with test -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:

site :opscode
cookbook 'ckbk'

and Vagrantfile:

Vagrant.configure('2') do |config|
  config.vm.box = 'precise32'
  config.vm.network :private_network, ip: '192.168.33.10'
  config.vm.provision :chef_solo do |chef|
    chef.nfs = true
    chef.add_recipe 'ckbk'
  end
end

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions