Snapshot operations fail on machines which haven't been created yet
madAndroid opened this issue · 3 comments
When running 'vagrant snap' on multi-vm vagrantfiles, if any of the machines listed are not created yet, the plugin fails, with the following traceback:
~/r/M/PWC ❯❯❯ vagrant snap list
/opt/vagrant/embedded/gems/gems/childprocess-0.3.9/lib/childprocess/abstract_process.rb:36:in `initialize': all arguments must be String: ["/usr/bin/VBoxManage", "showvminfo", nil, "--machinereadable"] (ArgumentError)
from /opt/vagrant/embedded/gems/gems/childprocess-0.3.9/lib/childprocess.rb:19:in `new'
from /opt/vagrant/embedded/gems/gems/childprocess-0.3.9/lib/childprocess.rb:19:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/util/subprocess.rb:66:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/util/subprocess.rb:24:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/plugins/providers/virtualbox/driver/base.rb:358:in `block in raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/plugins/providers/virtualbox/driver/base.rb:357:in `raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/plugins/providers/virtualbox/driver/base.rb:287:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/util/retryable.rb:17:in `retryable'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/plugins/providers/virtualbox/driver/base.rb:285:in `execute'
from /home/andrew/.vagrant.d/gems/gems/vagrant-zz-multiprovider-snap-0.0.3/lib/vagrant-multiprovider-snap/providers/virtualbox/driver/base.rb:21:in `snapshot_list'
from /home/andrew/.vagrant.d/gems/gems/vagrant-zz-multiprovider-snap-0.0.3/lib/vagrant-multiprovider-snap/command/list.rb:28:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/plugin/v2/command.rb:182:in `block in with_target_vms'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/plugin/v2/command.rb:180:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/plugin/v2/command.rb:180:in `with_target_vms'
from /home/andrew/.vagrant.d/gems/gems/vagrant-zz-multiprovider-snap-0.0.3/lib/vagrant-multiprovider-snap/command/list.rb:24:in `execute'
from /home/andrew/.vagrant.d/gems/gems/vagrant-zz-multiprovider-snap-0.0.3/lib/vagrant-multiprovider-snap/command/root.rb:45:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/cli.rb:46:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/lib/vagrant/environment.rb:467:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.3/bin/vagrant:84:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
PR #4 should fix this
Does this failure case only happen for the "list" command, or for the
others too? The take and rollback commands are dispatched via the
providers/*/action.rb code which should check to see if the VM has been
created before running the command. In that case, the PR contains
superfluous code.
On 26 August 2013 11:05, madAndroid notifications@github.com wrote:
PR #4https://github.com/scalefactory/vagrant-multiprovider-snap/issues/4should fix this
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-23282323
.
Yes indeed, that is correct - this does only occur during the 'list' command, and not the others ... I've updated the pull request