Comment 7 for bug 1712850

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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 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.

    Change-Id: I8e81704518cef8847dc65b70a75cbd5e67f1cd39
    Closes-Bug: #1712850