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 1445325 - virsh numatune --config returns automatic nodeset
Summary: virsh numatune --config returns automatic nodeset
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Jing Qi
URL:
Whiteboard:
Depends On: 1365779
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-25 13:40 UTC by Peter Krempa
Modified: 2018-04-10 10:44 UTC (History)
8 users (show)

Fixed In Version: libvirt-3.7.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1365779
Environment:
Last Closed: 2018-04-10 10:43:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0704 0 None None None 2018-04-10 10:44:08 UTC

Description Peter Krempa 2017-04-25 13:40:00 UTC
--- Additional comment from  on 2017-04-21 10:58:30 CEST ---

Hi, Peter

When set the memory mode='strict' placement='auto' in numatune part,
the return of virsh vcpupin/emulatorpin --config are correct.
However, the return of virsh numatune <> --config is wrong, the numa_nodeset should be null.

Please see more details as below:

Try to verify on packages:
libvirt-3.2.0-2.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

Test steps:
1. Prepare a numa machine with 4 numa nodes.
2. Prepare an inactive guest.
# virsh dumpxml vm1 --inactive|grep vcpu -A 3
  <vcpu placement='auto' current='6'>10</vcpu>
  <numatune>
    <memory mode='strict' placement='auto'/>
  </numatune>

3. Start the guest. 
# virsh start vm1
Domain vm1 started

4. check numatune/vcpupin/emulatorpin configure via virsh cmd:
# virsh numatune vm1
numa_mode      : strict
numa_nodeset   : 2-3

# virsh numatune vm1 --config
numa_mode      : strict
numa_nodeset   : 2-3

# virsh emulatorpin vm1 
emulator: CPU Affinity
----------------------------------
       *: 1,3,5,7,9,11,13,15,17,19,21,23

# virsh emulatorpin vm1 --config
emulator: CPU Affinity
----------------------------------
       *: 0-23

# virsh vcpupin vm1
VCPU: CPU Affinity
----------------------------------
   0: 1,3,5,7,9,11,13,15,17,19,21,23
   1: 1,3,5,7,9,11,13,15,17,19,21,23
   2: 1,3,5,7,9,11,13,15,17,19,21,23
   3: 1,3,5,7,9,11,13,15,17,19,21,23
   4: 1,3,5,7,9,11,13,15,17,19,21,23
   5: 1,3,5,7,9,11,13,15,17,19,21,23
   6: 1,3,5,7,9,11,13,15,17,19,21,23
   7: 1,3,5,7,9,11,13,15,17,19,21,23
   8: 1,3,5,7,9,11,13,15,17,19,21,23
   9: 1,3,5,7,9,11,13,15,17,19,21,23

# virsh vcpupin vm1 --config
VCPU: CPU Affinity
----------------------------------
   0: 0-23
   1: 0-23
   2: 0-23
   3: 0-23
   4: 0-23
   5: 0-23
   6: 0-23
   7: 0-23
   8: 0-23
   9: 0-23

Actual results:
libvirt show wrong numatune configure on a guest which is automatic nodeset.

Expected results:
# virsh numatune vm1 --config
numa_mode      : strict
numa_nodeset   :

--- Additional comment from  on 2017-04-21 11:27:04 CEST ---

Destroy the guest, check the numatune/vcpupin/emulatorpin configure via virsh cmd:

# virsh destroy vm1
Domain vm1 destroyed

# virsh dumpxml vm1 --inactive| grep vcpu -A 5
  <vcpu placement='auto' current='6'>10</vcpu>
  <numatune>
    <memory mode='strict' placement='auto'/>
  </numatune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.4.0'>hvm</type>

# virsh numatune vm1 --config
numa_mode      : strict
numa_nodeset   : 2-3

# virsh numatune vm1
numa_mode      : strict
numa_nodeset   : 2-3

# virsh vcpupin vm1
VCPU: CPU Affinity
----------------------------------
   0: 0-23
   1: 0-23
   2: 0-23
   3: 0-23
   4: 0-23
   5: 0-23
   6: 0-23
   7: 0-23
   8: 0-23
   9: 0-23

# virsh vcpupin vm1 --config
VCPU: CPU Affinity
----------------------------------
   0: 0-23
   1: 0-23
   2: 0-23
   3: 0-23
   4: 0-23
   5: 0-23
   6: 0-23
   7: 0-23
   8: 0-23
   9: 0-23

# virsh emulatorpin vm1 --config
emulator: CPU Affinity
----------------------------------
       *: 0-23

# virsh emulatorpin vm1
emulator: CPU Affinity
----------------------------------
       *: 0-23

Actual results:
libvirt show wrong numatune configure on a guest which is automatic nodeset.

Expected results:
# virsh numatune vm1 --config
numa_mode      : strict
numa_nodeset   :

Comment 1 Peter Krempa 2017-04-27 12:29:55 UTC
Fixed upstream:

commit 135c56e2b876e4cdf8d96de85b32bea3f10d81ce
Author: Peter Krempa <pkrempa>
Date:   Wed Apr 26 09:01:30 2017 +0200

    qemu: numa: Don't return automatic nodeset for inactive domain
    
    qemuDomainGetNumaParameters would return the automatic nodeset even for
    the persistent config if the domain was running. This is incorrect since
    the automatic nodeset will be re-queried upon starting the vm.

Comment 3 Jing Qi 2017-10-19 02:04:44 UTC
Verified it with libvirt-3.7.0-1.el7.x86_64 and qemu-kvm-rhev-2.10.0-1.el7.x86_64. 

1. Prepare a numa machine with 8 numa nodes.
2. Prepare an inactive guest.
# virsh dumpxml vm1 --inactive|grep vcpu -A 3
  <vcpu placement='auto' current='6'>10</vcpu>
  <numatune>
    <memory mode='strict' placement='auto'/>
  </numatune>
3. Start the guest. 
# virsh start vm1
Domain vm1 started

4. check numatune/vcpupin/emulatorpin configure via virsh cmd:
# virsh numatune vm1
numa_mode      : strict
numa_nodeset   : 3,5

# virsh numatune vm1 --config
numa_mode      : strict
numa_nodeset   : 

# virsh vcpupin vm1 
VCPU: CPU Affinity
----------------------------------
   0: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   1: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   2: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   3: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   4: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   5: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   6: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   7: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   8: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62
   9: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62

# virsh vcpupin vm1 --config
VCPU: CPU Affinity
----------------------------------
   0: 0-63
   1: 0-63
   2: 0-63
   3: 0-63
   4: 0-63
   5: 0-63
   6: 0-63
   7: 0-63
   8: 0-63
   9: 0-63

# virsh emulatorpin vm1
emulator: CPU Affinity
----------------------------------
       *: 33-34,37-38,41-42,45-46,49-50,53-54,57-58,61-62


# virsh vcpupin vm1 --config
VCPU: CPU Affinity
----------------------------------
   0: 0-63
   1: 0-63
   2: 0-63
   3: 0-63
   4: 0-63
   5: 0-63
   6: 0-63
   7: 0-63
   8: 0-63
   9: 0-63

The result from "virsh numatune <domain> --config" was as expected.

Comment 7 errata-xmlrpc 2018-04-10 10:43:32 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://access.redhat.com/errata/RHEA-2018:0704


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