diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2013-05-22 17:21:39 +0000 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2013-05-22 17:21:39 +0000 |
| commit | 7f7eeb07a8f9ddb2640f429eca41d80dbac5ff2b (patch) | |
| tree | 4a4b68489fe31ddb875f6e0988474255a226bb70 | |
| parent | 9d30c2ad150ca4aac3035f214390e8019c744fb8 (diff) | |
| download | nova-7f7eeb07a8f9ddb2640f429eca41d80dbac5ff2b.tar.gz nova-7f7eeb07a8f9ddb2640f429eca41d80dbac5ff2b.tar.xz nova-7f7eeb07a8f9ddb2640f429eca41d80dbac5ff2b.zip | |
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
| -rwxr-xr-x | nova/compute/manager.py | 3 |
1 files changed, 2 insertions, 1 deletions
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(): |
