Comment 7 for bug 1855927

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

Reviewed: https://review.opendev.org/748369
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5f3c33a4f12a40e5b5d9fef2a1b5345f5ff5cd04
Submitter: Zuul
Branch: stable/ussuri

commit 5f3c33a4f12a40e5b5d9fef2a1b5345f5ff5cd04
Author: Matt Riedemann <email address hidden>
Date: Mon Dec 16 16:15:24 2019 -0500

    Ensure source compute is up when confirming a resize

    When _poll_unconfirmed_resizes runs or a user tries to confirm
    a resize in the API, if the source compute service is down the
    migration status will be stuck in "confirming" status if it never
    reached the source compute. Subsequent runs of
    _poll_unconfirmed_resizes will not be able to auto-confirm the
    resize nor will the user be able to manually confirm the resize.
    An admin could reset the status on the server to ACTIVE or ERROR
    but that means the source compute never gets cleaned up since you
    can only confirm or revert a resize on a server with VERIFY_RESIZE
    status.

    This adds a check in the API before updating the migration record
    such that if the source compute service is down the API returns a
    409 response as an indication to try again later.

    SingleCellSimple._fake_target_cell is updated so that tests using
    it can assert when a context was targeted without having to stub
    nova.context.target_cell. As a result some HostManager unit tests
    needed to be updated.

    Change-Id: I33aa5e32cb321e5a16da51e227af2f67ed9e6713
    Closes-Bug: #1855927
    (cherry picked from commit e4601c77fb3b90638a6a56ec1a8e0e9eb7c91777)