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.
Reviewed: https:/ /review. opendev. org/654067 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ea297d6ffba 81c5dc982afe651 9de09ff3744cad
Committed: https:/
Submitter: Zuul
Branch: master
commit ea297d6ffba81c5 dc982afe6519de0 9ff3744cad
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
Closes-Bug: #1825537