[DRE-commits] [vagrant-libvirt] 21/77: Catches the following exception to prevent stack from being displayed: Bringing machine 'default' up with 'libvirt' provider... /home/teto/vagrant-libvirt/vendor/bundle/ruby/1.9.1/gems/fog-1.20.0/lib/fog/libvirt/models/compute/volume.rb:84:in `default_pool_name': No storage pools are defined (Fog::Errors::Error) from /home/teto/vagrant-libvirt/vendor/bundle/ruby/1.9.1/gems/fog-1.20.0/lib/fog/libvirt/models/compute/volume.rb:33:in `initialize' from /home/teto/vagrant-libvirt/vendor/bundle/ruby/1.9.1/gems/fog-1.20.0/lib/fog/core/collection.rb:114:in `new'

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Apr 24 13:56:34 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag 0.0.17
in repository vagrant-libvirt.

commit 29efbf77d7a1c2146a74d66bc8f2fa20107af414
Author: Matthieu Coudron <mattator at gmail.com>
Date:   Mon Mar 10 22:10:23 2014 +0100

    Catches the following exception to prevent stack from being displayed:
    Bringing machine 'default' up with 'libvirt' provider...
    /home/teto/vagrant-libvirt/vendor/bundle/ruby/1.9.1/gems/fog-1.20.0/lib/fog/libvirt/models/compute/volume.rb:84:in `default_pool_name': No storage pools are defined (Fog::Errors::Error)
        from /home/teto/vagrant-libvirt/vendor/bundle/ruby/1.9.1/gems/fog-1.20.0/lib/fog/libvirt/models/compute/volume.rb:33:in `initialize'
        from /home/teto/vagrant-libvirt/vendor/bundle/ruby/1.9.1/gems/fog-1.20.0/lib/fog/core/collection.rb:114:in `new'
---
 lib/vagrant-libvirt/action/set_name_of_domain.rb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/vagrant-libvirt/action/set_name_of_domain.rb b/lib/vagrant-libvirt/action/set_name_of_domain.rb
index a42e1eb..1aeffdf 100644
--- a/lib/vagrant-libvirt/action/set_name_of_domain.rb
+++ b/lib/vagrant-libvirt/action/set_name_of_domain.rb
@@ -21,10 +21,16 @@ module VagrantPlugins
           env[:domain_name] << '_'
           env[:domain_name] << env[:machine].name.to_s
           
+          begin
           @logger.info("Looking for domain #{env[:domain_name]} through list #{env[:libvirt_compute].servers.all}")
           # Check if the domain name is not already taken
-          domain = ProviderLibvirt::Util::Collection.find_matching(
+          
+            domain = ProviderLibvirt::Util::Collection.find_matching(
             env[:libvirt_compute].servers.all, env[:domain_name])
+          rescue Fog::Errors::Error => e
+            @logger.info("#{e}")
+            domain = nil
+          end
 
           @logger.info("Looking for domain #{env[:domain_name]}")
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-libvirt.git



More information about the Pkg-ruby-extras-commits mailing list