frapposelli / vagrant-vcenter

A Vagrant provider for VMware vCenter®
MIT License
107 stars 36 forks source link

Fails to upload the box (Folder.rb:84:in `traverse': unexpected path class NilClass (RuntimeError)) #14

Closed epcim closed 9 years ago

epcim commented 10 years ago

I am geting this issue just. Is there a way to debug?

{{{ vagrant up Bringing machine 'docker' up with 'vcenter' provider... ==> docker: Template [gosddc-precise64] does not exist! docker: Would you like to upload the [gosddc-precise64] box? docker: Choice (yes/no): yes ==> docker: Uploading [gosddc-precise64]... ==> docker: Adding [gosddc-precise64] /home/pmichalec/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/vim/Folder.rb:84:in traverse': unexpected path class NilClass (RuntimeError) from /home/pmichalec/.vagrant.d/gems/gems/vagrant-vcenter-0.3.0/lib/vagrant-vcenter/action/inventory_check.rb:54:invcenter_upload_box' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-vcenter-0.3.0/lib/vagrant-vcenter/action/inventory_check.rb:131:in vcenter_check_inventory' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-vcenter-0.3.0/lib/vagrant-vcenter/action/inventory_check.rb:21:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:inblock in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:56:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:incall' }}}

frapposelli commented 10 years ago

Run it as:

VAGRANT_LOG=DEBUG vagrant up

And post the log.

frapposelli commented 10 years ago

also, make sure you have curl in your PATH, it's a requirement for the upload to work (will be replacing it with a native Ruby solution asap).

epcim commented 10 years ago

If you don't mind just from the position tool ask for the image upload. Curl is in my path.

{{{ ==> docker: Template [gosddc-precise64] does not exist! INFO interface: ask: Would you like to upload the [gosddc-precise64] box? Choice (yes/no): INFO interface: ask: docker: Would you like to upload the [gosddc-precise64] box? docker: Choice (yes/no): docker: Would you like to upload the [gosddc-precise64] box? docker: Choice (yes/no): yes INFO interface: info: Uploading [gosddc-precise64]... INFO interface: info: ==> docker: Uploading [gosddc-precise64]... ==> docker: Uploading [gosddc-precise64]... DEBUG inventory_check: OVF File: file:///home/pmichalec/.vagrant.d/boxes/gosddc-VAGRANTSLASH-precise64/1.0.2/vcloud/precise64.ovf INFO interface: info: Adding [gosddc-precise64] INFO interface: info: ==> docker: Adding [gosddc-precise64] ==> docker: Adding [gosddc-precise64] ERROR warden: Error occurred: unexpected path class NilClass INFO warden: Beginning recovery process... INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x007f2110bb9508 INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. ERROR warden: Error occurred: unexpected path class NilClass INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: unexpected path class NilClass INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO environment: Released process lock: machine-action-027ab7202c304da0791ced025559f6d6 INFO environment: Running hook: environment_unload INFO runner: Preparing hooks for middleware sequence... INFO runner: 5 hooks defined. INFO runner: Running action: #Vagrant::Action::Builder:0x007f2110c26ec8 /home/pmichalec/.vagrant.d/gems/gems/vagrant-rbvmomi-1.8.1/lib/rbvmomi/vim/Folder.rb:84:in traverse': unexpected path class NilClass (RuntimeError) from /home/pmichalec/.vagrant.d/gems/gems/vagrant-vcenter-0.3.0/lib/vagrant-vcenter/action/inventory_check.rb:54:invcenter_upload_box' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-vcenter-0.3.0/lib/vagrant-vcenter/action/inventory_check.rb:131:in vcenter_check_inventory' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-vcenter-0.3.0/lib/vagrant-vcenter/action/inventory_check.rb:21:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:inblock in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:56:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in block in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:inbusy' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:53:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-vcenter-0.3.0/lib/vagrant-vcenter/action/connect_vcenter.rb:32:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/config_validate.rb:25:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-berkshelf-2.0.1/lib/berkshelf/vagrant/action/configure_chef.rb:22:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-berkshelf-2.0.1/lib/berkshelf/vagrant/action/load_shelf.rb:27:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-berkshelf-2.0.1/lib/berkshelf/vagrant/action/set_ui.rb:11:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/env_set.rb:19:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /home/pmichalec/.vagrant.d/gems/gems/vagrant-chef-zero-0.7.1/lib/vagrant-chef-zero/action/reconfig.rb:33:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/env_set.rb:19:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:incall' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in block in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:inbusy' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:inaction_raw' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in block in action' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:inlock' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:inaction' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run' ➜ vums git:(master) ✗ curl curl: try 'curl --help' or 'curl --manual' for more information

}}}

frapposelli commented 10 years ago

It's most likely a bug in the code, can you please create a template folder in vCenter and set your Vagrantfile to put the box in that folder with the `template_folder_name``directive?

That should work around the issue.

epcim commented 10 years ago

upload works now. Sorry forgot to test whether fail's the creation of the folder in my vcenter or the vcenter.template_folder_name directive was not set properly on your side (since in my Vagrantfile was missing). Would you like to debug it or you coun't to re-check once implemented without curl?

frapposelli commented 10 years ago

I will fix this bug it in the next minor release, the curl reimplementation will take significantly longer.