Comment 19 for bug 1806064

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (stable/pike)

Reviewed: https://review.openstack.org/623935
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6b85dafd87a242b3d312f01eadc9e67376349ba4
Submitter: Zuul
Branch: stable/pike

commit 6b85dafd87a242b3d312f01eadc9e67376349ba4
Author: Matt Riedemann <email address hidden>
Date: Mon Dec 3 12:55:11 2018 -0500

    Add functional regression test for bug 1806064

    Change I9269ffa2b80e48db96c622d0dc0817738854f602 in Pike
    introduced a race condition where creating multiple
    servers concurrently can fail the second instances quota
    check which happens in conductor after the instance record
    is created in the cell database but its related BDMs and
    tags are not stored in the cell DB. When deleting the
    server from the API, since the BDMs are not in the cell
    database with the instance, they are not "seen" and thus
    the volume attachments are not deleted and the volume is
    orphaned. As for tags, you should be able to see the tags
    on the server in ERROR status from the API before deleting
    it.

    This change adds a functional regression test to show both
    the volume attachment and tag issue when we fail the quota
    check in conductor.

    NOTE(s10): Three changes has been made in this test for Pike:
    1. CONF.glance.api_servers is mandatory in Pike, so
    nova.tests.unit.image.fake.stub_out_image_service has been added.
    2. CinderFixture is being used instead of CinderFixtureNewAttachFlow
    introduced in Queens.
    3. In Pike volume will be in 'attaching' state without attachment
    created, so just check for this state without listing attachments.

    Change-Id: I21c2189cc1de6b8e4857de77acd9f1ef8b6ea9f6
    Related-Bug: #1806064
    (cherry picked from commit 5d514b33e28964b38aeb42a8dd5b93f3fc8ae239)
    (cherry picked from commit 5b7e904126f68a8c9f5250620393dcdee54336d8)
    (cherry picked from commit 3f37d0bba46fd7f39265863b227c5fd504fa7864)