Red Hat Bugzilla – Bug 1121837
numatune can use nodeset 0,^0 but can't edit xml like this
Last modified: 2015-03-05 02:41:25 EST
Description of problem: numatune can use nodeset 0,^0 but can't edit xml like this Version-Release number of selected component (if applicable): libvirt-1.1.1-29.el7_0.1.x86_64 How reproducible: 100% Steps to Reproduce: 1.check numa status of your guest # virsh numatune test2 numa_mode : strict numa_nodeset : # virsh dumpxml test2 <vcpu placement='static'>2</vcpu> <------no numatune <os> 2.# virsh numatune test2 --nodeset 0 3.# virsh start test2 Domain test2 started 4.check a again # virsh dumpxml test2 <vcpu placement='static'>2</vcpu> <numatune> <memory mode='strict' nodeset='0'/> </numatune> <os> 5.# virsh destroy test2 Domain test2 destroyed # virsh edit test2 change: <memory mode='strict' nodeset='0'/> to <memory mode='strict' nodeset=''/> error: invalid argument: Failed to parse bitmap '' Failed. Try again? [y,n,f,?]:n 6.# virsh numatune test2 --nodeset 0,^0 7.# virsh start test2 error: Failed to start domain test2 error: invalid argument: Failed to parse bitmap '' 8.check in xml and numatune # virsh dumpxml test2 <numatune> <memory mode='strict' nodeset=''/> </numatune> # virsh numatune test2 numa_mode : strict numa_nodeset : Actual results: numatune can use nodeset 0,^0 but can't edit xml like this Expected results: Report error after use numatune --nodeset with 0,^0 Additional info:
Fixed upstream: commit 983f5a5076edcf738d326df63ead0e48936f0581 Author: Erik Skultety <eskultet@redhat.com> Date: Mon Aug 11 16:06:23 2014 +0200 numatune: Fix parsing of empty nodeset (0,^0) v1.2.7-45-g983f5a5
Could reproduce this issue with build libvirt-1.1.1-29.el7_0.1.x86_64 as bug steps mentioned. Verify this issue with build libvirt-1.2.8-1.el7.x86_64: 1.check numa status of your guest # virsh numatune r6 numa_mode : strict numa_nodeset : (the guest is no numatune) # virsh dumpxml r6 | grep -A5 vcpu <vcpu placement='static' current='1'>4</vcpu> <os> <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type> <loader>/usr/share/seabios/bios.bin</loader> <boot dev='hd'/> </os> # virsh numatune r6 --nodeset 0 check it again # virsh dumpxml r6 | grep -A5 vcpu <vcpu placement='static' current='1'>4</vcpu> <numatune> <memory mode='strict' nodeset='0'/> </numatune> <os> <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type> # virsh start r6 Domain r6 started [root@dhcp-66-71-72 ~]# virsh dumpxml r6 | grep -A5 vcpu <vcpu placement='static' current='1'>4</vcpu> <numatune> <memory mode='strict' nodeset='0'/> </numatune> <resource> <partition>/machine</partition> # virsh destroy r6 Domain r6 destroyed # virsh edit r6 change: <memory mode='strict' nodeset='0'/> to <memory mode='strict' nodeset=''/> error: invalid argument: Failed to parse bitmap '' Failed. Try again? [y,n,f,?]:n Could not set nodeset='' Could not set nodeset as ^0 # virsh numatune r6 --nodeset 0,^0 error: Unable to change numa parameters error: invalid argument: Failed to parse bitmap '0,^0' # virsh numatune r6 --nodeset ^0 error: Unable to change numa parameters error: invalid argument: Failed to parse bitmap '^0' # virsh start r6 Domain r6 started # virsh dumpxml r6 | grep -A5 vcpu <vcpu placement='static' current='1'>4</vcpu> <numatune> <memory mode='strict' nodeset='0'/> </numatune> <resource> <partition>/machine</partition> # virsh edit r6 change: <memory mode='strict' nodeset='0'/> to <memory mode='strict' nodeset=''/> error: invalid argument: Failed to parse bitmap '' Failed. Try again? [y,n,f,?]: Could not set nodeset=''
I can produce this bug on build libvirt-1.1.1-29.el7.x86_64 verify this on build libvirt-1.1.1-29.el7.x86_64 verify steps 1.prepare a guest without numatune tag in shutoff # virsh dumpxml rhel7new <domain type='kvm' id='79'> <name>rhel7new</name> <uuid>e73cdb84-e02c-4bb3-939f-f76d8d3c140a</uuid> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <blkiotune> <device> <path>/dev/sda</path> <weight>90</weight> </device> </blkiotune> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type> <boot dev='hd'/> </os> <features> 2. set numatune with command # virsh numatune rhel7new --nodeset 0,^0 error: Unable to change numa parameters error: invalid argument: Failed to parse bitmap '0,^0' # virsh numatune rhel7new --nodeset 0 [root@server ~]# virsh numatune rhel7new numa_mode : strict numa_nodeset : 0 3. dump guest xml # virsh dumpxml rhel7new <domain type='kvm' id='79'> <name>rhel7new</name> <uuid>e73cdb84-e02c-4bb3-939f-f76d8d3c140a</uuid> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <blkiotune> <device> <path>/dev/sda</path> <weight>90</weight> </device> </blkiotune> <vcpu placement='static'>1</vcpu> <numatune> <memory mode='strict' nodeset='0'/> </numatune> <resource> <partition>/machine</partition> </resource> 4. edit guest xml <numatune> <memory mode='strict' nodeset='0'/> ---> change to <memory mode='strict' nodeset=''/> </numatune> # virsh edit rhel7new error: invalid argument: Failed to parse bitmap '' Failed. Try again? [y,n,f,?]: move to verified
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0323.html