diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-01 15:10:45 -0400 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-03 09:37:59 -0400 |
| commit | 4cda8f70686da409eaec962abc9138607686eed7 (patch) | |
| tree | f4f87bf81cce1415685d86d24da124f65f3182a8 /nova/virt | |
| parent | bed85c136892ac0089393aa76c1f55d551cdb457 (diff) | |
Fixing immediate delete after boot on Libvirt
Addresses bug 884858
Change-Id: Ice05193fce7963dd9742b072cdb4b11882032abe
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) |
