Skip to content
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

Avoid installation path removal #151

Open
fgrehm opened this issue Aug 7, 2013 · 2 comments
Open

Avoid installation path removal #151

fgrehm opened this issue Aug 7, 2013 · 2 comments

Comments

@fgrehm
Copy link

fgrehm commented Aug 7, 2013

I've just started playing out with the Chef + Vagrant combo and while using vagrant-librarian-chef under vagrant-lxc I've hit an issue that vagrant-berkshelf users have reported to me in the past related to cookbooks installation.

The problem is this line and I worked around it by adding the code below to my Vagrantfile

require 'librarian/action'
class Librarian::Action::Install < Librarian::Action::Base
  def create_install_path
    if install_path.exist?
      FileUtils.rm_rf("#{install_path}/.", secure: true)
    end
    install_path.mkpath
  end
end

The problem with the current approach of recreating the whole directory messes up with vagrant-lxc shared folders / bind mounts and the guest container is no longer able to see the updated cookbooks after vagrant-librarian-chef kicks in. Without that change I can only provision my containers once and I'm not able to run vagrant provision after the machine is up.

I've already submitted a PR for Berkshelf and I'm up for doing the same here if you guys are up for doing the change :)

/cc @jimmycuadra

@tmatilai
Copy link

I haven't tested it, but this most probably breaks also vagrant provision with the VMware Fusion provider, and even with the Virtualbox provider when using NFS. See berkshelf/vagrant-berkshelf#88.

databus23 added a commit to databus23/librarian that referenced this issue Apr 16, 2014
This is a pull request for applicationsonline#151.
Removing the install_dir during each "librarian-chef install" breaks the shared folder of vagrant for at least the lxc and fusion provider.
@sbuzonas
Copy link

sbuzonas commented May 2, 2014

This does affect VirtualBox with NFS and this works to solve the problem there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants