From 7f7eeb07a8f9ddb2640f429eca41d80dbac5ff2b Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Wed, 22 May 2013 17:21:39 +0000 Subject: Reset task_state when resetting vm_state to ACTIVE A virt driver can raise InstanceFaultRollback to indicate that the instance should be reset to ACTIVE. However, the code that resets to ACTIVE does not reset task_state to None. This patch fixes that. Technically, there's currently no bug here, because the compute manager methods that matter here all have the reverts_task_state() decorator to always reset task_state to None on exceptions. However, a bug would be introduced later if we remove those decorators. Change-Id: Ibcf8ae3473f601781d8aae80f88df3da54bbaac8 --- nova/compute/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 91a814f98..8c959dbbf 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -4129,7 +4129,8 @@ class ComputeManager(manager.SchedulerDependentManager): msg = _("Setting instance back to ACTIVE after: %s") LOG.info(msg % error, instance_uuid=instance_uuid) self._instance_update(context, instance_uuid, - vm_state=vm_states.ACTIVE) + vm_state=vm_states.ACTIVE, + task_state=None) raise error.inner_exception except Exception, error: with excutils.save_and_reraise_exception(): -- cgit