commit 2a25d1e48bce34c7dd0d5783908fdb0dc1b19113
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.
NOTE(mriedem): The functional test conflict is due to not
having change I99427a52676826990d2a2ffc82cf30ad945b939c
in Rocky. The unit test conflict is due to not having
change I0851e2d54a1fdc82fe3291fb7e286e790f121e92 in Rocky.
The source_node attribute on the fake Migration object in
the unit test is added here because change
I312d61383345ea0ac1ab0c277b4c468e6aa94656 is not in Rocky.
Change-Id: Ic7d78ad43a2bad7f932c22c98944accbbed9e9e2
Partial-Bug: #1821594
(cherry picked from commit 408ef8f84a698f764aa5d769d6d01fd9340de2e5)
(cherry picked from commit 972d4e0eb391e83fe8d3020ff95db0e6a840a224)
Reviewed: https:/ /review. openstack. org/652127 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=2a25d1e48bc e34c7dd0d578390 8fdb0dc1b19113
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 2a25d1e48bce34c 7dd0d5783908fdb 0dc1b19113
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 allocation_ after_move is not called. That
leaking allocations on the source node resource provider
since _delete_
will be dealt with in a separate patch.
Conflicts:
nova/ tests/functiona l/test_ servers. py
nova/ tests/unit/ compute/ test_compute_ mgr.py
NOTE(mriedem): The functional test conflict is due to not 990d2a2ffc82cf3 0ad945b939c 82fe3291fb7e286 e790f121e92 in Rocky. 45ea0ac1ab0c277 b4c468e6aa94656 is not in Rocky.
having change I99427a52676826
in Rocky. The unit test conflict is due to not having
change I0851e2d54a1fdc
The source_node attribute on the fake Migration object in
the unit test is added here because change
I312d613833
Change-Id: Ic7d78ad43a2bad 7f932c22c98944a ccbbed9e9e2 64aa5d769d6d01f d9340de2e5) fe8d3020ff95db0 e6a840a224)
Partial-Bug: #1821594
(cherry picked from commit 408ef8f84a698f7
(cherry picked from commit 972d4e0eb391e83