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)
(cherry picked from commit e6c6178d22db43959103da1400017fa49b18f514)
(cherry picked from commit cbf6a46d8fcd3236bff44439c8d143a77167dfe2)
Reviewed: https:/ /review. opendev. org/682722 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=343daa98e00 6e019ef3ce0bc1e e2a6a7fe03c916
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 343daa98e006e01 9ef3ce0bc1ee2a6 a7fe03c916
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) 59103da1400017f a49b18f514) 6bff44439c8d143 a77167dfe2)
Closes-Bug: #1825537
(cherry picked from commit ea297d6ffba81c5
(cherry picked from commit e6c6178d22db439
(cherry picked from commit cbf6a46d8fcd323