Bug 1445325
| Summary: | virsh numatune --config returns automatic nodeset | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Peter Krempa <pkrempa> |
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
| Status: | CLOSED ERRATA | QA Contact: | Jing Qi <jinqi> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.3 | CC: | chhu, dyuan, jdenemar, jishao, lhuang, pkrempa, rbalakri, xuzhang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.7.0-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1365779 | Environment: | |
| Last Closed: | 2018-04-10 10:43:32 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: | 1365779 | ||
| Bug Blocks: | |||
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.
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.
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 |
--- 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 :