Comment 5 for bug 1477490

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

Reviewed: https://review.openstack.org/209457
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bfe52542f5449391b9dc152a90fd79afebcb3ff2
Submitter: Jenkins
Branch: master

commit bfe52542f5449391b9dc152a90fd79afebcb3ff2
Author: Lucas Alvares Gomes <email address hidden>
Date: Wed Aug 5 11:51:01 2015 +0100

    Ironic: Call unprovison for nodes in DEPLOYING state

    This patch is making the Nova ironic driver to try to unprovision the node
    even if it's in DEPLOYING state. Current Ironic will not accept aborting
    the deployment when it's in DEPLOYING state but with the retry mechanism
    it may work once the state is moved to ACTIVE or DEPLOYWAIT. Prior to
    this patch the logic was to not even try to unprovision the node if it's
    in DEPLOYING and just go ahead and clean the instance but that behavior
    is dangerous and could leave orphan active instances in Ironic. With
    this patch at least if the unprovision fails in Ironic we can make sure
    that the instance won't be deleted from Nova.

    The tests for the destroy() method were refactored to extend testing
    destroy() being called with all provision state methods in Ironic
    instead of picking certain ones; A helper function was created to avoid
    code duplication on the tests.

    Partial-Bug: #1477490
    Change-Id: I227eac73a9043dc242b7a0908bc27b628b830c3c