Bug 1217144
Summary: | Can not create a numa cell in the domain xml with zero CPUs or zero memory | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Sean Toner <stoner> | |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | |
Status: | CLOSED WONTFIX | QA Contact: | jiyan <jiyan> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.1 | CC: | berrange, chhu, dyuan, jinqi, jiyan, lhuang, mzhan, pkrempa, rmohr, xuzhang, yalzhang | |
Target Milestone: | rc | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1662586 (view as bug list) | Environment: | ||
Last Closed: | 2019-04-24 12:29:08 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: | ||||
Bug Depends On: | 1217537 | |||
Bug Blocks: | 1198819, 1662586 |
Description
Sean Toner
2015-04-29 16:01:06 UTC
When you are going to enable a NUMA topology you need to specify the memory for each NUMA cell since that can't be inferred from the total memory size in a sane way. As of the 'f' key in "virsh edit". The force option tries to define the XML again. Since it's invalid it will fail since the parser can't be forced to accept an invalid XML. Closing as NOTABUG, the memory attribute for the <cell> element is mandatory. The XML given was slightly misleading as to the problem - what Sean was actually trying todo was to create 2 numa nodes, one of which has all the RAM and the other which has no RAM. eg <numa> <cell id='0' cpus='0,1' memory='131072' unit='KiB'/> <cell id='1' cpus='2,3'/> </numa> Of course nothing is actually preventing use of memory='0', so this can in fact be achieved. <numa> <cell id='0' cpus='0,1' memory='131072' unit='KiB'/> <cell id='1' cpus='2,3' memory='0' unit='KiB'/> </numa> I'm actually re-opening this as I think we should address it. In the capabilities XML, if you have a node we no memory, libvirt leaves out the memory='0' attribute. Given this, I think that in the guest XML, if a NUMA node has no memory= attribute, it should be treated the same as if it had memory='0'. There is a corresponding problem with CPUs. it is impossible to leave out the 'cpus=' attribute in the domain XML, and you also cannot set it to the empty string, as libvirt complains it cannot parse the bitmap. Essentially, we should be free to create NUMA nodes which have zero CPUs, or zero memory, and libvirt is preventing that entirely for CPUs and unnecessarily mandating memory= attribute. I've posted a patch [1] that adds syntax sugar to allow specifying 0 memory for a numa node by omitting 'memory' attribute. Unfortunately while qemu accepts the command line (with or without the patch) the resulting NUMA topology from guest's point of view is broken. I'll clone this bug later so that that issue can be fixed. Until that is fixed it doesn't really make much sense to push that patch. CPU-less NUMA nodes are now possible: Libvirt now allows to hotplug or hotunplug individual vcpus. Together with the ability to configure them in the XML ( http://libvirt.org/formatdomain.html#elementsCPUAllocation ) this should provide features requested by this BZ: commit bd8f10c62aa4d0fa09bf74bc5f337a3a28b0d694 Author: Peter Krempa <pkrempa> Date: Fri Feb 10 17:14:22 2017 +0100 test: qemuhotplugtest: Add testing of individual vcpu hotplug Test that the vcpu entity selection code works properly commit f557b3351e0b6dee07b434ef65c81887c243d406 Author: Peter Krempa <pkrempa> Date: Tue Jun 21 17:17:41 2016 +0200 qemu: Implement individual vcpu hotplug API Add code that validates user's selection of cores and then uses the existing code to plug in the vCPU. commit f0326d6dd921a9b30437c0bc1f4aa98ec5a31272 Author: Peter Krempa <pkrempa> Date: Tue Jun 21 10:55:30 2016 +0200 virsh: Implement command for virDomainSetVcpu called setvcpu Add a simple virsh command handler which makes use of the new API. commit 8f657259bb9c8310b1f232249174f06f30089755 Author: Peter Krempa <pkrempa> Date: Tue Jun 21 10:44:51 2016 +0200 lib: Add API for specific vCPU hot(un)plug Similarly to domainSetGuestVcpus this commit adds API which allows to modify state of individual vcpus rather than just setting the count. This allows to enable CPUs in specific guest NUMA nodes to achieve any necessary configuration. [1] https://www.redhat.com/archives/libvir-list/2017-February/msg01087.html This bug is going to be addressed in next major release within existing cloned bug. |