0

I have a GitLab VM with Vagrant based on the GitLab Cookbook in production mode. I was running fine, until I had to restart the host today.

This is my output when I am running vagrant provision:

$ vagrant provision
[Berkshelf] This version of the Berkshelf plugin has not been fully tested on this version of Vagrant.
[Berkshelf] You should check for a newer version of vagrant-berkshelf.
[Berkshelf] If you encounter any errors with this version, please report them at https://github.com/RiotGames/vagrant-berkshelf/issues
[Berkshelf] You can also join the discussion in #berkshelf on Freenode.
[Berkshelf] Updating Vagrant's berkshelf: '/Users/admin/.berkshelf/default/vagrant/berkshelf-20140116-30359-fggony-default'
[Berkshelf] Using gitlab (0.6.4)
[Berkshelf] Using yum (2.4.2)
[Berkshelf] Installing magic_shell (0.3.2) from git: 'git://github.com/customink-webops/magic_shell.git' with branch: 'master' at ref: '447b4b67420d3a7a749d2dd3b13a7f9aceb54c36'
[Berkshelf] Installing monit (1.4.0) from git: 'git://github.com/phlipper/chef-monit.git' with branch: 'master' at ref: '276c99ba08869ebd5117267d91a2ff6aa0d9fc6b'
[Berkshelf] Using redisio (1.7.0)
[Berkshelf] Using ulimit (0.3.2)
[Berkshelf] Using ruby_build (0.8.0)
[Berkshelf] Using postgresql (3.3.4)
[Berkshelf] Using apt (2.3.0)
[Berkshelf] Using build-essential (1.4.2)
[Berkshelf] Using openssl (1.1.0)
[Berkshelf] Using mysql (4.0.10)
[Berkshelf] Using database (1.5.2)
[Berkshelf] Using aws (1.0.0)
[Berkshelf] Using xfs (1.1.0)
[Berkshelf] Using postfix (3.0.4)
[Berkshelf] Using phantomjs (1.0.3)
[Berkshelf] Using chocolatey (0.0.5)
[Berkshelf] Using powershell (1.1.2)
[Berkshelf] Using windows (1.11.0)
[Berkshelf] Using chef_handler (1.1.4)

Now it stays forever (more than 40 minutes) here ... after looking at some lsof output I found out that Berkshelf is creating a backup of all my files from home_git, which contains the application and repositories several GB in size.

ruby      10049 admin    7r     REG                1,2   59361467  99893126 /Users/admin/********/home_git/gitlab-satellites/*********/**********/.git/objects/89/61108fd29d60d311dd44b0e4d7ed0ddd7233ee
ruby      10049 admin    8w     REG                1,2   56639488 103952415 /Users/admin/.berkshelf/default/tmp/d20140206-10049-1q37zex/gitlab/home_git/gitlab-satellites/********/*********/.git/objects/89/61108fd29d60d311dd44b0e4d7ed0ddd7233ee

But these files don't have to be backed up, when I provision the VM.

Questions:

  • It looks like Berkshelf is treating these files as part of one of my cookbooks?
  • How could I tell Berkshelf to ignore this folder?

... or any other hint is very welcome! I also tried to disable Berkshelf without luck.

Workaround

If I move away the home_git folder the provisioning process runs through fast and smoothly.

schmunk
  • 4,708
  • 1
  • 27
  • 50

1 Answers1

2

Berkshelf 2 needed all of the cookbooks in a single location, since it compiled the metadata requirements on the fly. Berkshelf 3 uses a hosted API server, so this is no longer the case for most cookbooks.

However, it's also worth nothing that we are pushing people away from Vagrant Berkshelf and into Test Kitchen, as explained in this blog post: https://sethvargo.com/the-future-of-vagrant-berkshelf/

sethvargo
  • 26,739
  • 10
  • 86
  • 156