Comment 2 for bug 1455000

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Submitter: Jenkins
Branch: master

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.

    Closes-Bug: #1455000
    Change-Id: I315b8430a92907d27534f7b4828c35792371d6dc