Comment 3 for bug 1300288

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

Reviewed: https://review.openstack.org/84497
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=1b1d6b0cec64311ae62443b8647fd528d3c91f1d
Submitter: Jenkins
Branch: master

commit 1b1d6b0cec64311ae62443b8647fd528d3c91f1d
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Apr 1 16:16:02 2014 +0100

    Fix Nova rescheduling tear down problem

    If something fails in the spawn() method (e.g driver parameters, node
    in maintenance mode) nova will try to rescheduler the instance (in case
    the retry filter is enabled) as part of the rescheduling process nova
    will call destroy() on that instance which was cause another problem
    when Ironic tried to undeploy a node that wasn't deployed. This patch
    is fixing the tear down problem by checking the provision_state of the
    node before requesting Ironic to undeploy the node.

    Also, the relevant code and tests underwent some refactoring to make
    the code shorter and less nested.

    Closes-Bug: #1300288
    Co-Authored-By: Dmitry Tantsur <email address hidden>
    Change-Id: I4c7037d6c7b99548a646ef6665b29479277fb4d5