diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-11-03 19:55:18 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-11-03 19:55:18 +0000 |
| commit | fec3c19c492ee16096fdcd369b0adee6ddf43fb8 (patch) | |
| tree | 0962fd071639bef4665fbf6d821bd774f6b71328 /nova/virt | |
| parent | 907f219b6ad689707668aceb4081c461751b2bb5 (diff) | |
| parent | 4cda8f70686da409eaec962abc9138607686eed7 (diff) | |
Merge "Fixing immediate delete after boot on Libvirt"
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/libvirt/connection.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index f648af733..251d8041b 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -304,18 +304,18 @@ class LibvirtConnection(driver.ComputeDriver): locals()) raise - try: - # NOTE(justinsb): We remove the domain definition. We probably - # would do better to keep it if cleanup=False (e.g. volumes?) - # (e.g. #2 - not losing machines on failure) - virt_dom.undefine() - except libvirt.libvirtError as e: - errcode = e.get_error_code() - LOG.warning(_("Error from libvirt during undefine of " - "%(instance_name)s. Code=%(errcode)s " - "Error=%(e)s") % - locals()) - raise + try: + # NOTE(justinsb): We remove the domain definition. We probably + # would do better to keep it if cleanup=False (e.g. volumes?) + # (e.g. #2 - not losing machines on failure) + virt_dom.undefine() + except libvirt.libvirtError as e: + errcode = e.get_error_code() + LOG.warning(_("Error from libvirt during undefine of " + "%(instance_name)s. Code=%(errcode)s " + "Error=%(e)s") % + locals()) + raise for (network, mapping) in network_info: self.vif_driver.unplug(instance, network, mapping) |
