Cannot delete vm instance if duplicate delete requests are sent.
When user sends request to delete an instance, its task_state gets
changed to 'deleting' state. When an instance task_state is already in
'deleting' state and if at that moment the rabbitmq-server get crashed
by some reasons, then the instance task_state remains in 'deleting'
state and user won't be able to delete the instance forever.
At this moment, there is only one way to delete the instances, whose
task_state is in 'deleting' state, by restarting the nova-compute
services where these instances are running.
To avoid restarting the nova-compute service manually, modified the
force-delete api to allow instance deletion irrespective of
instance task_state.
Added new module to use delete_types as constants and replaced all
delete_type string occurances with new constants.
Reviewed: https:/ /review. openstack. org/121800 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=222d44532c6 5ddf3f26532ced2 17890628352536
Committed: https:/
Submitter: Jenkins
Branch: master
commit 222d44532c65ddf 3f26532ced21789 0628352536
Author: Rajesh Tailor <email address hidden>
Date: Mon Sep 15 07:20:14 2014 -0700
Allow force-delete irrespective of VM task_state
Cannot delete vm instance if duplicate delete requests are sent.
When user sends request to delete an instance, its task_state gets
changed to 'deleting' state. When an instance task_state is already in
'deleting' state and if at that moment the rabbitmq-server get crashed
by some reasons, then the instance task_state remains in 'deleting'
state and user won't be able to delete the instance forever.
At this moment, there is only one way to delete the instances, whose
task_state is in 'deleting' state, by restarting the nova-compute
services where these instances are running.
To avoid restarting the nova-compute service manually, modified the
force-delete api to allow instance deletion irrespective of
instance task_state.
Added new module to use delete_types as constants and replaced all
delete_type string occurances with new constants.
Closes-Bug: #1308342
Change-Id: I4d0e47662a8010 9ef9622d8545558 7d487e47c01