Disable limits if force_hosts or force_nodes is set
Setting max_placement_results will make force_host invaild sometimes,
especially in large-scale enviroment.
Disable limit param in GET /allocation_candidates if force_hosts
or force_nodes is set.
NOTE(xulei): There are differences from the original change because
I496e8d64907fdcb0e2da255725aed1fc529725f2 was not in stable/queens,
so we transplant code to get_allocation_candidates in this backport.
Change-Id: Iff1b49fe7e6347e3c2bb5992494b2450809719a2
Closes-Bug: #1777591
(cherry picked from commit 1d91811ad499af1d291f5c819ced5b1fdf3520c7)
Reviewed: https:/ /review. openstack. org/584616 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ab1fd87ed95 63ce8cf865ff539 916e5d804853dc
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit ab1fd87ed9563ce 8cf865ff539916e 5d804853dc
Author: xulei <email address hidden>
Date: Wed Jun 20 13:15:46 2018 +0800
Disable limits if force_hosts or force_nodes is set
Setting max_placement_ results will make force_host invaild sometimes, candidates if force_hosts
especially in large-scale enviroment.
Disable limit param in GET /allocation_
or force_nodes is set.
NOTE(xulei): There are differences from the original change because 7fdcb0e2da25572 5aed1fc529725f2 was not in stable/queens, candidates in this backport.
I496e8d6490
so we transplant code to get_allocation_
Change-Id: Iff1b49fe7e6347 e3c2bb5992494b2 450809719a2 d291f5c819ced5b 1fdf3520c7)
Closes-Bug: #1777591
(cherry picked from commit 1d91811ad499af1