berkshelf / vagrant-berkshelf

A Vagrant plugin to add Berkshelf integration to the Chef provisioners
Other
379 stars 100 forks source link

vagrant-berkshelf (4.0.3) not resolving dependencies. #286

Closed dkinzer closed 9 years ago

dkinzer commented 9 years ago

Only one cookbook is being updated when I run provision. All other cookbooks are being deleted.

I don't believe this issue is exactly the same as mitchellh/vagrant#5199 because I have followed all the workarounds there to no avail.

The following is the relevant output from vagrant provision

==> website-dev: Resolving cookbook dependencies...
==> website-dev: Using pacman (1.1.1)
==> website-dev: Vendoring pacman (1.1.1) to /home/dkinzer/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150529-12731-blbc6m-website-dev/pacman
 INFO warden: Calling IN action: #<VagrantPlugins::Berkshelf::Action::Upload:0x0000000310c928>
 INFO upload: Provisioner does need to upload
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::Provision:0x00000003183938>
 INFO provision: Ignoring sentinel check, forcing provision
 INFO provision: Checking provisioner sentinel file...
 INFO provision: Sentinel found! Not provisioning.
 INFO warden: Calling IN action: #<VagrantPlugins::Omnibus::Action::InstallChef:0x000000031ea3b8>
 INFO warden: Calling IN action: #<Proc:0x00000003265450@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:94 (lambda)>
 INFO warden: Calling IN action: #<Proc:0x00000002b6e958@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:94 (lambda)>
 INFO warden: Calling OUT action: #<Proc:0x00000002b6e958@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:94 (lambda)>
 INFO warden: Calling OUT action: #<Proc:0x00000003265450@/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:94 (lambda)>
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "7c5b0fb0-8de8-4ffb-a603-9013a7c0c1f6", "--machinereadable"]
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "7c5b0fb0-8de8-4ffb-a603-9013a7c0c1f6", "--machinereadable"]
 INFO ssh: Attempting SSH connection...
 INFO ssh: Attempting to connect to SSH...
 INFO ssh:   - Host: 127.0.0.1
 INFO ssh:   - Port: 2222
 INFO ssh:   - Username: jenkins
 INFO ssh:   - Password? false
 INFO ssh:   - Key Path: ["/home/dkinzer/.ssh/jenkins.private"]
 INFO ssh: SSH is ready!
 INFO ssh: Execute:  (sudo=false)
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "7c5b0fb0-8de8-4ffb-a603-9013a7c0c1f6", "--machinereadable"]
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "7c5b0fb0-8de8-4ffb-a603-9013a7c0c1f6", "--machinereadable"]
 INFO ssh: Execute: echo $(chef-solo -v) (sudo=true)
 INFO ssh: Execute: echo; printf $SSH_AUTH_SOCK (sudo=false)
 INFO ssh: Setting SSH_AUTH_SOCK remotely: /tmp/ssh-GHClJ3T2E1/agent.3374
 INFO interface: info: Chef 12.3.0 Omnibus package is already installed.
 INFO interface: info: ==> website-dev: Chef 12.3.0 Omnibus package is already installed.

System Info:

(website)(master)$uname -a
Linux linux 3.13.0-52-generic #86-Ubuntu SMP Mon May 4 04:32:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
dkinzer13:40[~/projects/devops/site-cookbooks/website]
(website)(master)$chef --version
Chef Development Kit Version: 0.5.1
chef-client version: 12.3.0
berks version: 3.2.3
kitchen version: 1.4.0
dkinzer13:40[~/projects/devops/site-cookbooks/website]
(website)(master)$vagrant version
Installed Version: 1.7.2
Latest Version: 1.7.2

You're running an up-to-date version of Vagrant!
dkinzer13:40[~/projects/devops/site-cookbooks/website]
(website)(master)$vagrant plugin list
vagrant-aws (0.6.0)
vagrant-berkshelf (4.0.3)
vagrant-librarian-chef (0.2.1)
vagrant-managed-servers (0.6.2)
vagrant-omnibus (1.4.1)
vagrant-rackspace (0.1.10)
vagrant-share (1.1.3, system
dkinzer commented 9 years ago

Once I remove the following configuration from my Vagrantfile the problem goes away.

website.berkshelf.only = %w(               
  Gemfile                                  
  Berksfile                                
  metadata.rb                              
  recipes                                  
  attributes                               
  templates                                
  files )                                  

However, it used to be the case that this configuration would prevent unwanted files from being added to the root cookbook (the one that is loaded when metadata.rb is included). I still think this is a bug.

sethvargo commented 9 years ago

Hi @dkinzer

The only group is used for Berkshelf's --only option which refers to groups in the Berksfile, not specific files.

dkinzer commented 9 years ago

OK, thanks for the clarification.