From 4f52cd9e24b8816c3079814394479ecc7608e753 Mon Sep 17 00:00:00 2001 From: Mark Washenberger Date: Fri, 2 Dec 2011 11:22:05 -0500 Subject: Better exception handling during run_instance Change-Id: I46700315022ef83a7f5f8fca517b126b95c16060 --- nova/compute/manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index aac163fd0..9bacae271 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -317,8 +317,8 @@ class ComputeManager(manager.SchedulerDependentManager): network_info, block_device_info, injected_files, admin_pass) except: - self._deallocate_network(context, instance) - raise + with utils.save_and_reraise_exception(): + self._deallocate_network(context, instance) self._notify_about_instance_usage(instance) except exception.InstanceNotFound: LOG.exception(_("Instance %s not found.") % instance_uuid) -- cgit