Comment 2 for bug 1506234

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

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

commit a36001fbee4ac039a9121127f7b9daa7f24a0acc
Author: Shraddha Pandhe <email address hidden>
Date: Fri Oct 30 00:38:18 2015 +0000

    Remove unnecessary destroy call from Ironic virt driver

    To give some context, calling destroy [5] was added as a
    bug fix [1]. It was required back then because, Nova compute
    was not calling destroy on catching the exception [2]. But now,
    Nova compute catches all exceptions that happen during spawn
    and calls destroy (_shutdown_instance) [3]

    Since Nova compute is already taking care of destroying the
    instance before rescheduling, we shouldn't have to call destroy
    separately in the driver. I confirmed in logs that destroy gets
    called twice if there is any failure during
    _wait_for_active() [4] or timeout happens [5]

    [1] https://review.openstack.org/#/c/99519/
    [2] https://github.com/openstack/nova/blob/2014.1.5/nova/compute/manager.py#L2116-L2118
    [3] https://github.com/openstack/nova/blob/2015.1.2/nova/compute/manager.py#L2472-L2497
    [4] https://github.com/openstack/nova/blob/2015.1.2/nova/virt/ironic/driver.py#L359-L384
    [5] https://github.com/openstack/nova/blob/2015.1.2/nova/virt/ironic/driver.py#L730-L741

    Closes-Bug: #1506234

    Change-Id: I09da7910befc4167d9cf043d12b19432ed70bcac