audiolize / vagrant-softlayer

This is a Vagrant plugin that adds a SoftLayer provider to Vagrant, allowing Vagrant to control and provision SoftLayer CCI instances.
MIT License
42 stars 15 forks source link

[bug] Provision Timeout Exception not cleanly caught #26

Closed ju2wheels closed 10 years ago

ju2wheels commented 10 years ago

Per vagrant standards all the exceptions should be caught and report proper message instead of stack trace. Provisioning timeout is throwing an exception that is not cleanly handled by sl_warden (this also probably affects rebuild timeout):

==> tempvagrantbuildparallel1: Waiting for instance provisioning. This may take a few minutes...
/home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/wait_for_provision.rb:28:in `sleep': execution expired (Timeout::Error)
    from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/wait_for_provision.rb:28:in `block (2 levels) in call'
    from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/util/warden.rb:18:in `sl_warden'
    from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/wait_for_provision.rb:25:in `block in call'
    from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/wait_for_provision.rb:23:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/create_instance.rb:23:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/sync_folders.rb:21:in `call'
    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/provision.rb:80:in `call'
    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:in `block 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:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
    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:in `busy'
    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:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/setup_softlayer.rb:34:in `call'
    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:in `call'
    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/handle_box.rb:56:in `call'
    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:in `call'
    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:in `busy'
    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:in `action_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:in `lock'
    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:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
lonniev commented 10 years ago

I know it too well. Ugly, isn’t it? However, it does nicely point to where one can monkey patch the provider.

On Wed, Aug 13, 2014 at 10:51 AM, Julio Lajara notifications@github.com wrote:

Per vagrant standards all the exceptions should be caught and report proper message instead of stack trace. Provisioning timeout is throwing an exception that is not cleanly handled by sl_warden (this also probably affects rebuild timeout):

==> tempvagrantbuildparallel1: Waiting for instance provisioning. This may take a few minutes... /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/wait_for_provision.rb:28:in sleep': execution expired (Timeout::Error) from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/wait_for_provision.rb:28:inblock (2 levels) in call' from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/util/warden.rb:18:in sl_warden' from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/wait_for_provision.rb:25:inblock in call' from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/wait_for_provision.rb:23:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:incall' from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/create_instance.rb:23:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:incall' from /home/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/sync_folders.rb:21: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/provision.rb:80: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/jalajara/.vagrant.d/gems/gems/vagrant-softlayer-0.3.1/lib/vagrant-softlayer/action/setup_softlayer.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/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 /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:56: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'

— Reply to this email directly or view it on GitHub https://github.com/audiolize/vagrant-softlayer/issues/26.

lonniev commented 10 years ago

I'm watching one session right now and SL has taken longer than 15 minutes in its "Assign Host" phase. I would prefer it if the provisioning times were predictable; as it is they vary widely. This makes it feel like they have a guy or gal holed up in Dallas who runs back and forth from their email to the hypervisor to create these VMs manually. ;-)

emyl commented 10 years ago

Fixed by https://github.com/audiolize/vagrant-softlayer/commit/84d6ace2af8de7015bc008869b83534e5caaf471.