From 25afdbbda8d56c509a4b34e0d6feeaafb2e46e5b Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Tue, 2 Apr 2013 19:51:39 +0000 Subject: Fix _error_out_instance exception handler Since Eventlet clears exceptions between greenthread switching, we need to save that exception so it can be re-raised. The _error_out_instance event handler did not wrap the quotas call with the save_and_reraise_exception, so the original exception was lost. Fixes bug 1163552 Change-Id: I69d28917aae1d787351cd800f8996532e5485eb2 --- nova/compute/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 30e33d8e0..775287192 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -3945,8 +3945,8 @@ class ComputeManager(manager.SchedulerDependentManager): try: yield except Exception, error: - self._quota_rollback(context, reservations) with excutils.save_and_reraise_exception(): + self._quota_rollback(context, reservations) msg = _('%s. Setting instance vm_state to ERROR') LOG.error(msg % error, instance_uuid=instance_uuid) self._set_instance_error_state(context, instance_uuid) -- cgit