summaryrefslogtreecommitdiffstats
path: root/nova/openstack
diff options
context:
space:
mode:
authorEoghan Glynn <eglynn@redhat.com>2012-09-12 17:20:13 +0100
committerEoghan Glynn <eglynn@redhat.com>2012-09-12 18:16:29 +0100
commit5f4d20ef439fe04e5d7ab7e1d4610b739222ce6b (patch)
tree8f6537fe3370e8e1519f602e0adf93cf5e27eeb2 /nova/openstack
parent511807ed248fbe63cb6642c1cff6e0bd4bb8ae5d (diff)
Avoid VM task state revert on instance termination
Related to bug 1046236. Previously, if an exception is raised during the nova-compute node's instance termination logic *before* the instance is evicted from the DB (e.g. in the network teardown), then the task_state is reverted back to None by the reverts_task_state decorator, so the instance continues to be reported as ACTIVE with no outstanding task. A subsequent attempt to delete the same instance results in the quota_usages in_use count being decremented a second time. This occurs despite I91a70ada as that fix depends on the VM task state continuing to be DELETING. That logic was undermined in Id4358c50 which caused the task state to be reverted on the successful or unsuccessful conclusion of the action on the compute node. Now, the motivation for Id4358c50 was to avoid the VM getting stuck with a task state that prevents any further action other than deletion. However in the case of a deletion already having been requested, this protection is unnecessary and counter-productive. Hence we remove the task state reversion from the terminate_instance action. Change-Id: Ie5701e5c12f6241a203423d29d05df1858406c56
Diffstat (limited to 'nova/openstack')
0 files changed, 0 insertions, 0 deletions