Comment 27 for bug 1821594

Reviewed: https://review.opendev.org/652150
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c6a42cd3b38528bbf410b33c3bfc384600ae053f
Submitter: Zuul
Branch: stable/queens

commit c6a42cd3b38528bbf410b33c3bfc384600ae053f
Author: Matt Riedemann <email address hidden>
Date: Mon Mar 25 13:16:42 2019 -0400

    Error out migration when confirm_resize fails

    If anything fails and raises an exception during
    confirm_resize, the migration status is stuck in
    "confirming" status even though the instance status
    may be "ERROR".

    This change adds the errors_out_migration decorator
    to the confirm_resize method to make sure the migration
    status is "error" if an error is raised.

    In bug 1821594 it was the driver.confirm_migration
    method that raised some exception, so a unit test is
    added here which simulates a similar scenario.

    This only partially closes the bug because we are still
    leaking allocations on the source node resource provider
    since _delete_allocation_after_move is not called. That
    will be dealt with in a separate patch.

    Conflicts:
          nova/tests/unit/compute/test_compute_mgr.py

    NOTE(mriedem): The conflict is due to not having change
    Ia05525058e47efb806cf8820410c8bc80eccca25 in Queens.

    Change-Id: Ic7d78ad43a2bad7f932c22c98944accbbed9e9e2
    Partial-Bug: #1821594
    (cherry picked from commit 408ef8f84a698f764aa5d769d6d01fd9340de2e5)
    (cherry picked from commit 972d4e0eb391e83fe8d3020ff95db0e6a840a224)
    (cherry picked from commit e3f69c8af0d13f0aa60e9a267f25050729f7766c)