"mixed" policy calculations don't account for host cells with no shared CPU allocation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Medium
|
Stephen Finucane |
Bug Description
The 'mixed' CPU policy allows us to use both shared and dedicated CPUs (VCPU and PCPU) in the same instance. The expectation is that the both sets of CPUs will use host cores from the same NUMA node(s). The current code does appear to be doing this, at least for single NUMA nodes, however, it does not account for NUMA nodes without any shared CPUs.
# Steps to reproduce
Configure a dual NUMA node host so that all cores from one node are assigned to '[compute] cpu_shared_set', while all the cores from the other node are assigned to '[compute] cpu_dedicated_set'. For example, on a host where cores 0-5 are on node 0, while cores 6-11 are on node 1:
[compute]
cpu_shared_set = 0-5
cpu_dedicated_set = 6-11
Now attempt to boot a guest using the mixed policy, e.g.
$ openstack flavor create --vcpu 4 --ram 512 --disk 1 \
--property 'hw:cpu_
test.mixed
$ openstack server create --os-compute-
--flavor test.mixed --image cirros-
test-server
# Expected result
The instance should fail to schedule as the 'NUMATopologyFi
# Actual result
The instance is scheduled but fails to boot since the following invalid XML snippet is generated:
<cputune>
<shares>
<emulatorpin cpuset="0-1,4"/>
<vcpupin vcpu="0" cpuset=""/> # <--- here
<vcpupin vcpu="1" cpuset="0"/>
<vcpupin vcpu="2" cpuset="1"/>
<vcpupin vcpu="3" cpuset="4"/>
</cputune>
This results in the following traceback in the nova-compute logs.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
ERROR nova.compute.
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Stephen Finucane (stephenfinucane) |
tags: | added: libvirt numa |
summary: |
- "mixed" policy calculations don't account for host cells with no free - shared CPUs + "mixed" policy calculations don't account for host cells with no shared + CPU allocation |
Related fix proposed to branch: master /review. opendev. org/756100
Review: https:/