Bug 1717899

Summary: libvirt must fully specify vCPU NUMA mapping
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Peter Krempa <pkrempa>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED WONTFIX QA Contact: Jing Qi <jinqi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: berrange, chhu, dyuan, jsuchane, lhuang, xuzhang, yalzhang
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-15 07:36:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Krempa 2019-06-06 12:16:01 UTC
Description of problem:
Specifying a config like:

  <vcpu placement='auto' current='2'>12</vcpu>

[...]

  <cpu>
    <numa>
      <cell id='0' cpus='0,2,4,6' memory='512000' unit='KiB'/>
      <cell id='1' cpus='1,3,5,7' memory='512000' unit='KiB'/>
    </numa>
  </cpu>

Results in:

2019-06-06T11:43:21.655857Z qemu-system-x86_64: warning: CPU(s) not present in any NUMA nodes: CPU 8 [socket-id: 8, core-id: 0,
thread-id: 0], CPU 9 [socket-id: 9, core-id: 0, thread-id: 0], CPU 10 [socket-id: 10, core-id: 0, thread-id: 0], CPU 11
[socket-id: 11, core-id: 0, thread-id: 0]
2019-06-06T11:43:21.655870Z qemu-system-x86_64: warning: All CPU(s) up to maxcpus should be described in NUMA config, ability to
start up with partial NUMA mappings is obsoleted and will be removed in future

QEMU rightfully deprecated mapping cpus which were not specified in the NUMA topology to some random node.

Version-Release number of selected component (if applicable):
libvirt-v5.4.0-166-gd23f5fa08c
qemu-v4.0.0-917-g8c1ecb5904

How reproducible:
always, just don't specify all vCPUs in the NUMA topology.

Steps to Reproduce:
1. define XML with some vCPUS missing in NUMA
2. start VM
3. look at vm log file

Actual results:
warnings printed

Expected results:
...

Additional info:

Comment 1 Daniel Berrangé 2020-03-18 16:58:13 UTC
(In reply to Peter Krempa from comment #0)
> QEMU rightfully deprecated mapping cpus which were not specified in the NUMA
> topology to some random node.

Yeah, I'd argue this situation is a application bug and libvirt doesn't need to workaround it. If anything we should report the error to the application before we even launch QEMU.

Comment 2 Peter Krempa 2020-03-18 17:05:37 UTC
The problem is that old apps may use the legacy APIs for modifying the number of VCPUs in which case we will not update the numa topology. We must then either ban those APIs if numa is used or allow some kind of fallback.

Comment 5 RHEL Program Management 2021-03-15 07:36:34 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.