Comment 8 for bug 1660878

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

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

commit 8ba92778fe14b47ad4ff5b53022e0550a93f37d3
Author: Matt Riedemann <email address hidden>
Date: Wed Feb 1 10:35:32 2017 -0500

    Ensure build request exists before creating instance

    When creating instances in conductor, the build requests are
    coming from the compute API and might be stale by the time
    the instance is created, i.e. the build request might have
    been deleted from the database before the instance is actually
    created in a cell.

    This is trivial to recreate; all you need to do is create a
    server and then immediately delete it, then try to perform
    some kind of action on the server expecting it to be deleted
    but the action might not return a 404 for a missing instance.
    We're seeing this in Tempest runs where the expected 404 for
    the deleted instance is a 409 because the test is trying to
    perform an action on a server while it's building, which is
    generally not allowed.

    This fixes the issue by making a last-second check to make
    sure the build request still exists before the instance is
    created in a cell.

    Change-Id: I6c32d5a4086a227d59ad7b1f6f50e7e532c74c84
    Closes-Bug: #1660878