commit 5600309a1fc38f0f98629608d3f41eacf66d714a
Author: Matt Riedemann <email address hidden>
Date: Wed May 15 12:27:17 2019 -0400
[stable-only] Delete allocations even if _confirm_resize raises (part 2)
The backport https://review.opendev.org/#/c/652153/ to fix bug 1821594 did not account for how the _delete_allocation_after_move
method before Stein is tightly coupled to the migration status
being set to "confirmed" which is what the _confirm_resize method
does after self.driver.confirm_migration returns.
However, if self.driver.confirm_migration raises an exception
we still want to cleanup the allocations held on the source node
and for that we call _delete_allocation_after_move. But because
of that tight coupling before Stein, we need to temporarily
mutate the migration status to "confirmed" to get the cleanup
method to do what we want.
This isn't a problem starting in Stein because change
I0851e2d54a1fdc82fe3291fb7e286e790f121e92 removed that
tight coupling on the migration status, so this is a stable
branch only change.
Note that we don't call self.reportclient.delete_allocation_for_instance
directly since before Stein we still need to account for a
migration that does not move the source node allocations to the
migration record, and that logic is in _delete_allocation_after_move.
A simple unit test assertion is added here but the functional
test added in change I9d6478f492351b58aa87b8f56e907ee633d6d1c6
will assert the bug is fixed properly before Stein.
Change-Id: I933687891abef4878de09481937d576ce5899511
Closes-Bug: #1821594
(cherry picked from commit dac3239e92fc1865cacc17bbfbd2316072a9d26e)
Reviewed: https:/ /review. opendev. org/661349 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=5600309a1fc 38f0f98629608d3 f41eacf66d714a
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 5600309a1fc38f0 f98629608d3f41e acf66d714a
Author: Matt Riedemann <email address hidden>
Date: Wed May 15 12:27:17 2019 -0400
[stable-only] Delete allocations even if _confirm_resize raises (part 2)
The backport https:/ /review. opendev. org/#/c/ 652153/ to fix allocation_ after_move confirm_ migration returns.
bug 1821594 did not account for how the _delete_
method before Stein is tightly coupled to the migration status
being set to "confirmed" which is what the _confirm_resize method
does after self.driver.
However, if self.driver. confirm_ migration raises an exception allocation_ after_move. But because
we still want to cleanup the allocations held on the source node
and for that we call _delete_
of that tight coupling before Stein, we need to temporarily
mutate the migration status to "confirmed" to get the cleanup
method to do what we want.
This isn't a problem starting in Stein because change 1fdc82fe3291fb7 e286e790f121e92 removed that
I0851e2d54a
tight coupling on the migration status, so this is a stable
branch only change.
Note that we don't call self.reportclie nt.delete_ allocation_ for_instance allocation_ after_move.
directly since before Stein we still need to account for a
migration that does not move the source node allocations to the
migration record, and that logic is in _delete_
A simple unit test assertion is added here but the functional 58aa87b8f56e907 ee633d6d1c6
test added in change I9d6478f492351b
will assert the bug is fixed properly before Stein.
Change-Id: I933687891abef4 878de09481937d5 76ce5899511 5cacc17bbfbd231 6072a9d26e)
Closes-Bug: #1821594
(cherry picked from commit dac3239e92fc186