summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2011-12-02 19:43:09 +0000
committerGerrit Code Review <review@openstack.org>2011-12-02 19:43:09 +0000
commit022295ecc2a936eab98b8a1900690ac0cd87b134 (patch)
tree75620542813ab99569df0789872366eab4e85f20
parent2903bf1e4b0833a34e18711bf89c8da6240cc2b6 (diff)
parent4f52cd9e24b8816c3079814394479ecc7608e753 (diff)
downloadnova-022295ecc2a936eab98b8a1900690ac0cd87b134.tar.gz
nova-022295ecc2a936eab98b8a1900690ac0cd87b134.tar.xz
nova-022295ecc2a936eab98b8a1900690ac0cd87b134.zip
Merge "Better exception handling during run_instance"
-rw-r--r--nova/compute/manager.py4
1 files 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)