summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorMatthew Sherborne <msherborne@gmail.com>2013-04-20 19:08:07 +1000
committerMatthew Sherborne <msherborne@gmail.com>2013-04-23 22:22:05 +1000
commit40692574bbdefbdfa4a6f3366bec524fd4612400 (patch)
tree80e666e59702888e79422e7c7477089c83e63842 /nova/compute
parentbfc3a3ccb2811cc8a96a15987528e6639ec029bf (diff)
If rescue fails don't error the instance
If a rescue attempt fails, the VM's state should return to what it was before the rescue attempt started, and the user should be notified of the failure. Fixes bug: 1170328 Change-Id: If5e97d06a3617adad83a4bba2ac6320616bbe83b
Diffstat (limited to 'nova/compute')
-rwxr-xr-xnova/compute/manager.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 5da050f60..f1ab1629e 100755
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -2007,7 +2007,6 @@ class ComputeManager(manager.SchedulerDependentManager):
@exception.wrap_exception(notifier=notifier, publisher_id=publisher_id())
@reverts_task_state
@wrap_instance_event
- @wrap_instance_fault
def rescue_instance(self, context, instance, rescue_password=None):
"""
Rescue an instance on this host.
@@ -2028,10 +2027,16 @@ class ComputeManager(manager.SchedulerDependentManager):
else:
rescue_image_meta = {}
- with self._error_out_instance_on_exception(context, instance['uuid']):
+ try:
self.driver.rescue(context, instance,
self._legacy_nw_info(network_info),
rescue_image_meta, admin_password)
+ except Exception as e:
+ LOG.exception(_("Error trying to Rescue Instance"),
+ instance=instance)
+ raise exception.InstanceNotRescuable(
+ instance_id=instance['uuid'],
+ reason=_("Driver Error: %s") % unicode(e))
current_power_state = self._get_power_state(context, instance)
self._instance_update(context,