summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Lamar <brian.lamar@rackspace.com>2011-04-11 09:27:14 +0000
committerTarmac <>2011-04-11 09:27:14 +0000
commit25047dd2a121ea9c8e7a8ded970aa5a7254bbfc5 (patch)
treebd3157cab5be2dd3afdf7b2d6722690b8cf616c4
parent50f3f759468fa549b686dcef98633946163588e6 (diff)
parent79ebe165f255037b0d5eaad7afe81b51cf85ed63 (diff)
downloadnova-25047dd2a121ea9c8e7a8ded970aa5a7254bbfc5.tar.gz
nova-25047dd2a121ea9c8e7a8ded970aa5a7254bbfc5.tar.xz
nova-25047dd2a121ea9c8e7a8ded970aa5a7254bbfc5.zip
Currently terminating an instance will hang in a loop, this allows for deletion of instances when using a libvirt backend. Also I couldn't help add a debug log where an exception is caught and ignored.
-rw-r--r--nova/virt/libvirt_conn.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py
index b949e6c92..9c665ab15 100644
--- a/nova/virt/libvirt_conn.py
+++ b/nova/virt/libvirt_conn.py
@@ -325,12 +325,15 @@ class LibvirtConnection(driver.ComputeDriver):
state = self.get_info(instance['name'])['state']
db.instance_set_state(context.get_admin_context(),
instance['id'], state)
- if state == power_state.SHUTDOWN:
+ if state == power_state.SHUTOFF:
break
- except Exception:
+ except Exception as ex:
+ msg = _("Error encountered when destroying instance '%(id)s': "
+ "%(ex)s") % {"id": instance["id"], "ex": ex}
+ LOG.debug(msg)
db.instance_set_state(context.get_admin_context(),
instance['id'],
- power_state.SHUTDOWN)
+ power_state.SHUTOFF)
break
self.firewall_driver.unfilter_instance(instance)