commit b53133ba50457f1a4983434800ebef710da67999
Author: Matt Riedemann <email address hidden>
Date: Thu Aug 24 15:32:01 2017 -0400
Cleanup allocations in failed prep_resize
During a resize/migration, the scheduler 'doubles' the
allocations on both the source and destination hosts, which
could be the same host if resizing to the same host.
If prep_resize fails, the destination node allocations were
not getting cleaned up before rescheduling to another host.
If it's a resize to the same host, the doubled allocation
from the scheduler wasn't being subtracted for the single host.
This change cleans up the allocations from the current node
when prep_resize fails. If it's not a resize to the same host,
we're on the destination node already. If it is a resize to
the same host, remove_provider_from_instance_allocation in the
SchedulerReportClient accounts for subtracting the new flavor
from the doubled allocation.
Reviewed: https:/ /review. openstack. org/497592 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b53133ba504 57f1a4983434800 ebef710da67999
Committed: https:/
Submitter: Jenkins
Branch: master
commit b53133ba50457f1 a4983434800ebef 710da67999
Author: Matt Riedemann <email address hidden>
Date: Thu Aug 24 15:32:01 2017 -0400
Cleanup allocations in failed prep_resize
During a resize/migration, the scheduler 'doubles' the
allocations on both the source and destination hosts, which
could be the same host if resizing to the same host.
If prep_resize fails, the destination node allocations were
not getting cleaned up before rescheduling to another host.
If it's a resize to the same host, the doubled allocation
from the scheduler wasn't being subtracted for the single host.
This change cleans up the allocations from the current node provider_ from_instance_ allocation in the portClient accounts for subtracting the new flavor
when prep_resize fails. If it's not a resize to the same host,
we're on the destination node already. If it is a resize to
the same host, remove_
SchedulerRe
from the doubled allocation.
Change-Id: I8e81704518cef8 847dc65b70a75cb d5e67f1cd39
Closes-Bug: #1712850