summaryrefslogtreecommitdiffstats
path: root/nova/virt
diff options
context:
space:
mode:
Diffstat (limited to 'nova/virt')
-rw-r--r--nova/virt/powervm/operator.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/nova/virt/powervm/operator.py b/nova/virt/powervm/operator.py
index 09ad662b3..6ed7535a7 100644
--- a/nova/virt/powervm/operator.py
+++ b/nova/virt/powervm/operator.py
@@ -26,7 +26,9 @@ from nova import flags
from nova import utils
from nova.compute import power_state
+from nova.openstack.common import excutils
from nova.openstack.common import log as logging
+
from nova.virt import images
from nova.virt.powervm import command
from nova.virt.powervm import common
@@ -264,7 +266,13 @@ class PowerVMOperator(object):
time.sleep(1)
except exception.PowerVMImageCreationFailed:
- self._cleanup(instance['name'])
+ with excutils.save_and_reraise_exception():
+ # log errors in cleanup
+ try:
+ self._cleanup(instance['name'])
+ except Exception:
+ LOG.exception(_('Error while attempting to '
+ 'clean up failed instance launch.'))
def destroy(self, instance_name):
"""Destroy (shutdown and delete) the specified instance.