summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-10-12 23:02:52 +0000
committerGerrit Code Review <review@openstack.org>2012-10-12 23:02:52 +0000
commit8f38bd8707255c39b2fea168460b89fbbb7717ad (patch)
treed575e0b58753995b52ea5cdd422d57d98a0edeb4 /nova
parentbb53babeae5b8d540bba8bb3327e8a86c8977368 (diff)
parent3e6829a2012dd557a9e7c64281d4e6c73d1e3632 (diff)
Merge "Pass correct task_state on snapshot"
Diffstat (limited to 'nova')
-rw-r--r--nova/compute/api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index a4435b5b6..f13fc55d4 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -1202,6 +1202,11 @@ class API(base.Base):
self.db.instance_test_and_set(
context, instance_uuid, 'task_state', [None], task_state)
+ # NOTE(sirp): `instance_test_and_set` only sets the task-state in the
+ # DB, but we also need to set it on the current instance so that the
+ # correct value is passed down to the compute manager.
+ instance['task_state'] = task_state
+
notifications.send_update_with_states(context, instance, old_vm_state,
instance["vm_state"], old_task_state, instance["task_state"],
service="api", verify_states=True)