Reviewed: https://review.openstack.org/497592 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b53133ba50457f1a4983434800ebef710da67999 Submitter: Jenkins Branch: master
commit b53133ba50457f1a4983434800ebef710da67999 Author: Matt Riedemann <[email protected]> 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. Change-Id: I8e81704518cef8847dc65b70a75cbd5e67f1cd39 Closes-Bug: #1712850 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1712850 Title: Allocations are not removed from destination node when rescheduling during resize/migrate Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) pike series: In Progress Bug description: This is similar to bug 1712718 but instead of the case that we're creating a new instance (or unshelving an offloaded instance), this is the case that a resize/cold migration fails it's pre-check or claim on the destination host and gets rescheduled: https://github.com/openstack/nova/blob/16.0.0.0rc1/nova/compute/manager.py#L3801 That is called from prep_resize which happens on the destination node, so we should call SchedulerReportClient.remove_provider_from_instance_allocation in that case to remove the allocations against the destination node before rescheduling. Note that we can't just remove all allocations since that would remove the allocations that already exist on the source node for the instance during a resize/migrate. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1712850/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

