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 RequestGroup used in this backport has to use
nova.api.openstack.placement.lib.RequestGroup because
nova.objects.RequestGroup didn't exist until Stein with change
I46c97d2641d9685ef59771314665a17a5236097d.
Change-Id: Ia2d5f80b6db59a8f6da03344aeaa6aa599407672
Closes-Bug: #1827628
(cherry picked from commit 2f9e972ba3358fc5bc9bdc06faf47b21d509e20f)
(cherry picked from commit c094a6ef0c220ace7f717a07bef6fbd87a019190)
Reviewed: https:/ /review. opendev. org/659246 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=aa19788d784 9780e4ca30ea0bd 7577a349ece704
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit aa19788d7849780 e4ca30ea0bd7577 a349ece704
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 results parameter when nova queries candidates` ` if the spec.scheduler_ hints containts any of group, same_host or
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_
placement for ``GET /allocation_
request_
different_host keys.
NOTE(mriedem): The RequestGroup used in this backport has to use api.openstack. placement. lib.RequestGrou p because objects. RequestGroup didn't exist until Stein with change d9685ef59771314 665a17a5236097d .
nova.
nova.
I46c97d2641
Change-Id: Ia2d5f80b6db59a 8f6da03344aeaa6 aa599407672 5bc9bdc06faf47b 21d509e20f) e7f717a07bef6fb d87a019190)
Closes-Bug: #1827628
(cherry picked from commit 2f9e972ba3358fc
(cherry picked from commit c094a6ef0c220ac