InstanceNotFound during local delete in API does not short-circuit

Bug #1680211 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann
Ocata
Fix Committed
Undecided
Matt Riedemann

Bug Description

The cells v2-specific local delete path in the compute API is handling an InstanceNotFound when instance.destroy() fails, but doesn't return from the _delete() method:

https://github.com/openstack/nova/blob/caee532ff82d618fb30ace84a4cd0d7b1d1faa96/nova/compute/api.py#L1889

It just continues to the rest of the delete code, which is pointless since we already know the instance is gone.

Tags: api cellsv2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/453840

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

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

commit 5a9cc2fb7af3e3a9db44646bbd23cfcfb16891f5
Author: Matt Riedemann <email address hidden>
Date: Wed Apr 5 15:12:41 2017 -0400

    Short-circuit local delete path for cells v2 and InstanceNotFound

    When we're going down the local delete path for cells v2 in the API
    and instance.destroy() fails with an InstanceNotFound error, we are
    racing with a concurrent delete request and know that the instance
    is alread deleted, so we can just return rather than fall through to
    the rest of the code in the _delete() method, like for BDMs and
    console tokens.

    Change-Id: I58690a25044d2804573451983323dde05be9e5d6
    Closes-Bug: #1680211

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/453939

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

Reviewed: https://review.openstack.org/453939
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=eaa38bc973d65f897078157e2008653ef47e3d47
Submitter: Jenkins
Branch: stable/ocata

commit eaa38bc973d65f897078157e2008653ef47e3d47
Author: Matt Riedemann <email address hidden>
Date: Wed Apr 5 15:12:41 2017 -0400

    Short-circuit local delete path for cells v2 and InstanceNotFound

    When we're going down the local delete path for cells v2 in the API
    and instance.destroy() fails with an InstanceNotFound error, we are
    racing with a concurrent delete request and know that the instance
    is alread deleted, so we can just return rather than fall through to
    the rest of the code in the _delete() method, like for BDMs and
    console tokens.

    Conflicts:
          nova/compute/api.py

    NOTE(mriedem): The conflict is due to not having change
    edf51119fa59ff8a3337abb9107a06fa33d3c68f in stable/ocata.

    Change-Id: I58690a25044d2804573451983323dde05be9e5d6
    Closes-Bug: #1680211
    (cherry picked from commit 5a9cc2fb7af3e3a9db44646bbd23cfcfb16891f5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.3

This issue was fixed in the openstack/nova 15.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.0.0.0b1

This issue was fixed in the openstack/nova 16.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.