Drop source node allocations if finish_resize fails
By the time finish_resize runs on the dest host, the instance
host/node values are already pointing at the dest (they are
set by resize_instance on the source compute before casting to
finish_resize on the dest). If finish_resize fails, the instance
is essentially stuck on the dest host so rather than revert the
allocations (which will drop the new flavor allocations against
the dest host where the instance now lives) we should just drop
the old flavor allocations on the source node resource provider,
which is what this change does.
The functional regression recreate test is updated to show this
working.
Change-Id: I52c8d038118c858004e17e71b2fba9e9e2714815
Closes-Bug: #1825537
(cherry picked from commit ea297d6ffba81c5dc982afe6519de09ff3744cad)
Reviewed: https:/ /review. opendev. org/667155 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e6c6178d22d b43959103da1400 017fa49b18f514
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit e6c6178d22db439 59103da1400017f a49b18f514
Author: Matt Riedemann <email address hidden>
Date: Fri Apr 19 12:28:34 2019 -0400
Drop source node allocations if finish_resize fails
By the time finish_resize runs on the dest host, the instance
host/node values are already pointing at the dest (they are
set by resize_instance on the source compute before casting to
finish_resize on the dest). If finish_resize fails, the instance
is essentially stuck on the dest host so rather than revert the
allocations (which will drop the new flavor allocations against
the dest host where the instance now lives) we should just drop
the old flavor allocations on the source node resource provider,
which is what this change does.
The functional regression recreate test is updated to show this
working.
Change-Id: I52c8d038118c85 8004e17e71b2fba 9e9e2714815 dc982afe6519de0 9ff3744cad)
Closes-Bug: #1825537
(cherry picked from commit ea297d6ffba81c5