Comment 11 for bug 1827628

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

Reviewed: https://review.opendev.org/659247
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=472b9993550f1ffbcce769843f793652162cb8dc
Submitter: Zuul
Branch: stable/queens

commit 472b9993550f1ffbcce769843f793652162cb8dc
Author: Surya Seetharaman <email address hidden>
Date: Thu May 9 16:22:13 2019 +0200

    Disable limit if affinity(anti)/same(different)host is requested

    When max_placement_results is less than the total number of nodes in
    a deployment it may not be possible to use the affinity, anti-affinity,
    same host or different host filters as there is no guarantee
    for placement to return the expected hosts under such situations. This
    patch disables the max_placement_results parameter when nova queries
    placement for ``GET /allocation_candidates`` if the
    request_spec.scheduler_hints containts any of group, same_host or
    different_host keys.

    NOTE(mriedem): The test is modified to remove the to_querystring
    call since change I496e8d64907fdcb0e2da255725aed1fc529725f2 that
    added it was in Rocky. As such, assertResourceRequestsEqual is
    changed to also assert the expected limit value.

    Change-Id: Ia2d5f80b6db59a8f6da03344aeaa6aa599407672
    Closes-Bug: #1827628
    (cherry picked from commit 2f9e972ba3358fc5bc9bdc06faf47b21d509e20f)
    (cherry picked from commit c094a6ef0c220ace7f717a07bef6fbd87a019190)
    (cherry picked from commit aa19788d7849780e4ca30ea0bd7577a349ece704)