21307395 nova ZoneConfig class should call cancelConfig when editConfig fails in __exit__ s11-update
authorBrian Reitz <Brian.Reitz@Oracle.COM>
Tue, 23 Jun 2015 14:51:21 -0700
branchs11-update
changeset 4645 7e2c683157d6
parent 4637 36222db47113
child 4646 2bb9a036a5f2
21307395 nova ZoneConfig class should call cancelConfig when editConfig fails in __exit__
components/openstack/nova/files/solariszones/driver.py
--- a/components/openstack/nova/files/solariszones/driver.py	Wed Jul 01 01:29:06 2015 -0700
+++ b/components/openstack/nova/files/solariszones/driver.py	Tue Jun 23 14:51:21 2015 -0700
@@ -197,6 +197,9 @@
                 LOG.error(_("Unable to commit the new configuration for "
                             "instance '%s' via zonemgr(3RAD): %s")
                           % (self.zone.name, err))
+
+                # Last ditch effort to cleanup.
+                self.zone.cancelConfig()
                 raise
 
     def setprop(self, resource, prop, value):