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 1129998 - numatune --mode can't work well
Summary: numatune --mode can't work well
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: x86_64
OS: All
medium
medium
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-14 06:49 UTC by Luyao Huang
Modified: 2015-03-05 07:42 UTC (History)
9 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:42:30 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-08-14 06:49:21 UTC
description of problem:
 numatune --mode can't work well 

Version-Release number of selected component (if applicable):
libvirt-1.2.7-1.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.prepare a guest with no numa set
# virsh dumpxml r7
<domain type='kvm'>
  <name>r7</name>
  <uuid>343cf2ee-2de1-4d0e-87de-15c697494f96</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>8</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>
  <features>

2.change NUMA mode (guest shut off)
# virsh numatune r7 --mode 0
error: Unable to change numa parameters
error: unsupported configuration: nodeset for NUMA memory tuning must be set if 'placement' is 'static'

3.do it again
# virsh numatune r7 --mode 0

4.  # virsh dumpxml r7
<numatune>
    <memory mode='strict' </numatune>

5.# virsh start r7
error: Failed to start domain r7
error: (domain_definition):8: error parsing attribute name
    <memory mode='strict' </numatune>
--------------------------^



Actual results:
Can't change NUMA mode well now,
seems xml file miss placement


Expected results:
dumpxml like this:
<numatune>
    <memory mode='preferred' placement='auto'/>
  </numatune>


Additional info:

Comment 2 Erik Skultety 2014-08-25 06:58:51 UTC
Fixed upstream:

commit b9ff7393bca5df988e182b45ede34c636b0ae90d
Author: Erik Skultety <eskultet>
Date:   Fri Aug 22 16:05:37 2014 +0200

    numatune: setting --mode does not work well
    
    When trying to set numatune mode directly using virsh numatune command,
    correct error is raised, however numatune structure was not deallocated,
    thus resulting in creating an empty numatune element in the guest XML,
    if none was present before. Running the same command aftewards results
    in a successful change with broken XML structure. Patch fixes the
    deallocation problem as well as checking for invalid attribute
    combination VIR_DOMAIN_NUMATUNE_PLACEMENT_AUTO + a nonempty nodeset.
    
    Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1129998

v1.2.7-211-gb9ff739

Comment 4 zhengqin 2014-09-11 06:02:18 UTC
I could reproduce this issue with build libvirt-1.2.7-1.el7.x86_64 as bug steps mentioned.




Verify this issue with build libvirt-1.2.8-1.el7.x86_64:


Steps to Verify:
1. prepare a guest with no numa set
# virsh dumpxml r6
<domain type='kvm'>
  <name>r6</name>
  <uuid>63b566d4-40e9-4152-b784-f46cc953abb0</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <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>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>


2.change NUMA mode (guest shut off)
# virsh numatune r6 --mode 0
error: Unable to change numa parameters
error: unsupported configuration: nodeset for NUMA memory tuning must be set if 'placement' is 'static'

3. Do it again:
[root@dhcp-66-71-72 ~]# virsh numatune r6 --mode 0
error: Unable to change numa parameters
error: unsupported configuration: nodeset for NUMA memory tuning must be set if 'placement' is 'static'

4. Do it again:
[root@dhcp-66-71-72 ~]# virsh numatune r6 --mode 0
error: Unable to change numa parameters
error: unsupported configuration: nodeset for NUMA memory tuning must be set if 'placement' is 'static'

5. Do it again:
[root@dhcp-66-71-72 ~]# virsh numatune r6 --mode 0
error: Unable to change numa parameters
error: unsupported configuration: nodeset for NUMA memory tuning must be set if 'placement' is 'static'

6.  # virsh dumpxml r6 | grep memory
<memory unit='KiB'>1048576</memory>


7. Start the guest:
 # virsh start r6
Domain r6 started

 # virsh list
 Id    Name                           State
----------------------------------------------------
 29    r6                             running

Comment 5 vivian zhang 2014-11-28 08:54:21 UTC
I can produce this bug on build libvirt-1.1.1-29.el7.x86_64

verify this bug on build
libvirt-1.2.8-9.el7.x86_64


1. prepare a guest without numatune in shutoff
# virsh dumpxml rhel7new
<domain type='kvm'>
  <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>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>

2. run numatune command

# virsh numatune rhel7new --mode 0
error: Unable to change numa parameters
error: unsupported configuration: nodeset for NUMA memory tuning must be set if 'placement' is 'static'

3. do it again and again
# virsh numatune rhel7new --mode 0
error: Unable to change numa parameters
error: unsupported configuration: nodeset for NUMA memory tuning must be set if 'placement' is 'static'

# virsh numatune rhel7new --mode strict
error: Unable to change numa parameters
error: unsupported configuration: nodeset for NUMA memory tuning must be set if 'placement' is 'static'

4.set with right config parameters
# virsh numatune rhel7new --mode strict --nodeset 0

[root@server ~]# virsh numatune rhel7new
numa_mode      : strict
numa_nodeset   : 0

[root@server ~]# virsh numatune rhel7new --mode strict --nodeset 1-2

[root@server ~]# virsh numatune rhel7new
numa_mode      : strict
numa_nodeset   : 1-2

[root@server ~]# virsh numatune rhel7new --mode 1 --nodeset 1-2

[root@server ~]# virsh numatune rhel7new
numa_mode      : preferred
numa_nodeset   : 1-2

[root@server ~]# virsh numatune rhel7new --mode 2 --nodeset 1-3

[root@server ~]# virsh numatune rhel7new
numa_mode      : interleave
numa_nodeset   : 1-3

[root@server ~]# virsh numatune rhel7new --mode 0 --nodeset 0

[root@server ~]# virsh numatune rhel7new
numa_mode      : strict
numa_nodeset   : 0

[root@server ~]# virsh start rhel7new
Domain rhel7new started

move to verified

Comment 7 errata-xmlrpc 2015-03-05 07:42:30 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.