RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1121837 - numatune can use nodeset 0,^0 but can't edit xml like this
Summary: numatune can use nodeset 0,^0 but can't edit xml like this
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 7.0
Assignee: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-22 03:42 UTC by Luyao Huang
Modified: 2015-03-05 07:41 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.2.8-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:41:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Luyao Huang 2014-07-22 03:42:37 UTC
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:

Comment 3 Erik Skultety 2014-08-15 09:30:25 UTC
Fixed upstream:

commit 983f5a5076edcf738d326df63ead0e48936f0581
Author: Erik Skultety <eskultet>
Date:   Mon Aug 11 16:06:23 2014 +0200

numatune: Fix parsing of empty nodeset (0,^0)

v1.2.7-45-g983f5a5

Comment 5 zhengqin 2014-09-11 06:28:23 UTC
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=''

Comment 6 vivian zhang 2014-11-28 10:10:19 UTC
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

Comment 8 errata-xmlrpc 2015-03-05 07:41:25 UTC
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


Note You need to log in before you can comment on or make changes to this bug.