AllocationCandidates.get_by_filters hits incorrectly when traits are split across the main RP and aggregates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
When requesting multiple resources with multiple traits, placement doesn't know that a particular trait needs to be associated with a particular resource. As currently conceived, it will return allocation candidates from the main RP plus shared RPs such that all traits are satisfied This is bad, particularly when the main RP and shared RPs provide inventory from the same resource class.
For example, consider a compute node that has local SSD storage, which is associated with a shared storage RP with a RAID5 array:
cnrp { VCPU: 24,
MEMORY_MB: 2048,
DISK_GB: 16,
traits: [HW_CPU_X86_SSE,
ssrp { DISK_GB: 32,
traits: [STORAGE_
A request for SSD + RAID5 disk should *not* return any results from the above setup, because there's not actually any disk with both of those characteristics.
AllocationCand
resources={ VCPU: 1,
traits= [HW_CPU_X86_SSE,
Expected:
allocation_
Actual:
allocation_
{ cnrp: { VCPU: 1,
ssrp: { DISK_GB: 2 } },
]
I will post a review shortly with a test case that demonstrates this. Note, however, that the test will spuriously pass until https:/
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Related fix proposed to branch: master /review. openstack. org/513149
Review: https:/