Add nested resource providers limit for multi create
In 21.0.0 Ussuri we were completed the nova-cyborg interaction feature,
but there are some issue when multiple create instances.
Creating servers with accelerators provisioned with the Cyborg service,
if a flavor asks for resources that are provided by nested Resource
Provider inventories (eg. VGPU) and the user wants multi-create (ie. say
--max 2) then the scheduler could be returning a NoValidHosts exception
even if each nested Resource Provider can support at least one specific
instance, if the total wanted capacity is not supported by only one
nested RP.
For example,creating servers with accelerators provisioned with the
Cyborg service, if two children RP have 4 VGPU inventories each:
- you can ask for a flavor with 2 VGPU with --max 2
- but you can't ask for a flavor with 4 VGPU and --max 2
Reviewed: https:/ /review. opendev. org/723884 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=c19de075e1c 6dcaeac1af25e77 aa87c277fa295a
Committed: https:/
Submitter: Zuul
Branch: master
commit c19de075e1c6dca eac1af25e77aa87 c277fa295a
Author: zhangbailin <email address hidden>
Date: Tue Apr 28 20:09:00 2020 +0800
Add nested resource providers limit for multi create
In 21.0.0 Ussuri we were completed the nova-cyborg interaction feature,
but there are some issue when multiple create instances.
Creating servers with accelerators provisioned with the Cyborg service,
if a flavor asks for resources that are provided by nested Resource
Provider inventories (eg. VGPU) and the user wants multi-create (ie. say
--max 2) then the scheduler could be returning a NoValidHosts exception
even if each nested Resource Provider can support at least one specific
instance, if the total wanted capacity is not supported by only one
nested RP.
For example,creating servers with accelerators provisioned with the
Cyborg service, if two children RP have 4 VGPU inventories each:
- you can ask for a flavor with 2 VGPU with --max 2
- but you can't ask for a flavor with 4 VGPU and --max 2
Related-Bug: #1874664 c891134cedb49f0 3d3c61e8824
Change-Id: I64647a6ba79c47