commit ea3967a1fb47297608defd680286fd9051ff5bbe
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu May 14 10:56:13 2015 +0100
Ironic: Fix delete instance when spawning
Nova allows issuing a "nova delete" command when the instance is being
spawned, that wasn't working in Ironic because the spawn() in the Ironic
nova driver doesn't return until the node have been deployed or errored
out and that causes Ironic to hold a lock that prevents the instance
termination to call destroy() in the Ironic nova driver.
This patch fixes that problem by making the loop waiting on the node to
get active (or error) in Ironic to also look at the instance task_state
and see if it's being deleted. In case the instance is being deleted
mid deployment operation we break the loop releasing the lock and then
destroy() gets called in Ironic aborting the deployment there.
Reviewed: https:/ /review. openstack. org/182992 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ea3967a1fb4 7297608defd6802 86fd9051ff5bbe
Committed: https:/
Submitter: Jenkins
Branch: master
commit ea3967a1fb47297 608defd680286fd 9051ff5bbe
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu May 14 10:56:13 2015 +0100
Ironic: Fix delete instance when spawning
Nova allows issuing a "nova delete" command when the instance is being
spawned, that wasn't working in Ironic because the spawn() in the Ironic
nova driver doesn't return until the node have been deployed or errored
out and that causes Ironic to hold a lock that prevents the instance
termination to call destroy() in the Ironic nova driver.
This patch fixes that problem by making the loop waiting on the node to
get active (or error) in Ironic to also look at the instance task_state
and see if it's being deleted. In case the instance is being deleted
mid deployment operation we break the loop releasing the lock and then
destroy() gets called in Ironic aborting the deployment there.
Closes-Bug: #1455000 d27534f7b4828c3 5792371d6dc
Change-Id: I315b8430a92907