summaryrefslogtreecommitdiffstats
path: root/nova/crypto.py
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2012-07-17 13:15:13 -0700
committerDan Smith <danms@us.ibm.com>2012-08-14 09:18:54 -0700
commitd8d7100f8c10ecd388d1943bee9298a913a6990a (patch)
tree8a7e7aa65944c65baf41a3ee903a15b8e1b30187 /nova/crypto.py
parent444b1bf04d718b34a6b82a785afe641c01e92ee7 (diff)
downloadnova-d8d7100f8c10ecd388d1943bee9298a913a6990a.tar.gz
nova-d8d7100f8c10ecd388d1943bee9298a913a6990a.tar.xz
nova-d8d7100f8c10ecd388d1943bee9298a913a6990a.zip
Revert task_state on failed instance actions
Right now, the task_state logic in compute/api.py can be broken, such that instances can get stuck in an uneditable state if an action is performed that fails. The task_state remains something like 'stopping' even though the action has not been completed or queued, and further requests that depend on task_state will fail (see check_instance_state() in compute/apy.py). The only way out of it is to delete the instance or hack the database. This patch adds a reverts_task_state() decorator to compute/manager.py, which, upon operation failure, reverts the instance's task_state back to None. It also adds a test_state_revert() test to verify that all the actions marked for state reversion do the right thing. It also corrects several other tests that specifically expect the task_state to remain after an error has occurred. Fixes bug 1025722 Change-Id: Id4358c508156c713cb953dfa0f01a6f598bc1e7d
Diffstat (limited to 'nova/crypto.py')
0 files changed, 0 insertions, 0 deletions