Closed colindean closed 10 years ago
This occurs even when setting config.cache.auto_detect = false
.
I seemed to have worked around it temporarily by setting config.cache.scope = :machine
.
@colindean this is weird....
I don't know why but somehow it seems that the box object is not set for the VM as the stacktrace points us to this line
Just to double check, did you download the box before using the plugin?
Yes, I downloaded the box before installing the plugin.
Fabio Rehm notifications@github.com wrote:
@colindean this is weird....
I don't know why but somehow it seems that the box object is not set for the VM as the stacktrace points us to this line
Just to double check, did you download the box before using the plugin?
Reply to this email directly or view it on GitHub: https://github.com/fgrehm/vagrant-cachier/issues/86#issuecomment-35580053
It seems to me like the bug is caused by box.name
being nil. See here
My guess is, L36 should be:
@env[:home_path].join('cache', @env[:machine].name)
I hit a similar issue using dvm:
==> dvm: Verifying vmnet devices are healthy...
/Users/miah/.vagrant.d/gems/gems/vagrant-cachier-0.7.0/lib/vagrant-cachier/action/configure_bucket_root.rb:36:in `cache_root': undefined method `name' for nil:NilClass (NoMethodError)
from /Users/miah/.vagrant.d/gems/gems/vagrant-cachier-0.7.0/lib/vagrant-cachier/action/configure_bucket_root.rb:24:in `setup_buckets_folder'
from /Users/miah/.vagrant.d/gems/gems/vagrant-cachier-0.7.0/lib/vagrant-cachier/action/configure_bucket_root.rb:16:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/lock.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.3.6/lib/vagrant-vmware-fusion/action_farm.rb:80:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.3.6/lib/vagrant-vmware-fusion/action_farm.rb:1018:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/box_check_outdated.rb:28:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.3.6/lib/vagrant-vmware-fusion/action_farm.rb:1232:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.3.6/lib/vagrant-vmware-fusion/action_farm.rb:282:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.3.6/lib/vagrant-vmware-fusion/action_farm.rb:152:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builder.rb:116:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/call.rb:51:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.3.6/lib/vagrant-vmware-fusion/action_farm.rb:1232:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/lock.rb:42:in `block in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/lock.rb:27:in `open'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/lock.rb:27:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.3.6/lib/vagrant-vmware-fusion/action_farm.rb:108:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-vmware-fusion-2.3.6/lib/vagrant-vmware-fusion/action_farm.rb:282:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
from /Users/miah/.vagrant.d/gems/gems/vagrant-berkshelf-2.0.0.rc2/lib/berkshelf/vagrant/action/configure_chef.rb:14:in `call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
I'm probably wrong in my assessment of the cause above. Further looking,
boot2docker-0.5.4-1 (vmware_desktop, 0)
- url: https://github.com/mitchellh/boot2docker-vagrant-box/releases/download/v0.5.4-1/boot2docker_vmware.box
- downloaded_at: 2014-02-13T18:57:22Z
I think in this case, the 'machine.box.name' would be 'boot2docker-0.5.4.1' and that L36 as referenced above is really trying to pull that out to segregate all the caches by machine type. This makes sense, I'd want all centos-6 systems to share the same cache.
We might want to .fetch
the box.name
though and if nil, set it to some 'default'
[:machine].box.fetch(:name) { 'default' }
@miah thanks for all the info but I'm still trying to understand why the box.name
is nil
by the time we try to configure the buckets root since vagrant shouldn't allow a VM to be "upped" without a box.
are you or @colindean able to share a full Vagrantfile
that reproduces the issue and also gist the output of a vagrant up --debug
from scratch? I'm using the plugin from an Ubuntu host with both virtualbox and the lxc provider and I haven't been able to reproduce it from my side =/
I just set everything up today on a new machine (latest Vagrant, VirtualBox, all the plugins, etc.) and didn't have a problem with the same Vagrantfile
. I am, however, still using config.cache.scope = :machine
in my config.
I'll see if I can reproduce it with that option off. I'm afraid I can't post the Vagrantfile
without going through more clearances than it's worth. I might try to reproduce it with less-customized config if I get a chance, though.
I don't have a OSX machine around to try to reproduce this and trying to track it down without a Vagrantfile and a debug log is pretty hard.
For now I'm going to close the issue and we can always get back to it when we have more information :-)
I believe this is caused by the box that your Vagrant file previously referenced has been deleted.
Is it worth re-opening this @fgrehm? We see this error pretty regularly. Try deleting your vagrant box and then vagrant reload a machine that used that box.
FWIW, a vagrant destroy / vagrant up solves the problem
I'll give it a try when I have a chance, lemme reopen
Confirmed that I'm seeing the same issue on OS X after deleting a box and vagrant reload
ing.
This was fixed in git, a new release will come out with it as soon as I'm done with the stuff tagged with the v1.0.0 milestone
Thanks everyone for the information provided :smile:
Unfortunately, I'm working on a confidential project, so I can't post the full Vagrantfile. Here are the relevant sections:
OSX 10.8.5. Virtualbox 4.2.18 (I guess I should update that, haha, but I don't think it's related because this config is working on a Linux machine with a version older than that).
Just installed Vagrant 1.4.3 and the plugins today. I had previously installed Vagrant 1.3.5.