Bug 1232663 - cannot change the nodeset if we do not set the numatune in guest xml
Summary: cannot change the nodeset if we do not set the numatune in guest xml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-17 09:14 UTC by Luyao Huang
Modified: 2015-11-19 06:41 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.17-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 06:41:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Luyao Huang 2015-06-17 09:14:29 UTC
description of problem:
cannot change the nodeset if we do not set the numatune in guest xml

Version-Release number of selected component (if applicable):

libvirt-1.2.16-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. prepare a guest *without* numatune settings:

  <memory unit='KiB'>1024000</memory>
  <currentMemory unit='KiB'>1024000</currentMemory>
  <vcpu placement='static'>5</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.2.0'>hvm</type>
    <boot dev='hd'/>
  </os>


2. start it and check the numa policy:
# virsh start test4
Domain test4 started

# virsh numatune test4
numa_mode      : strict
numa_nodeset   :

3.

# virsh numatune test4 --mode strict --nodeset 1
error: Unable to change numa parameters
error: Requested operation is not valid: change of nodeset for running domain requires strict numa mode


Actual results:
Cannot change the nodeset if we do not set the numatune in guest xml

from 2 step we know the mode is strict, but when we change the nodeset, libvirt
point out that our mode is not strict

cannot reproduce this issue with libvirt-1.2.15-2.el7.x86_64, so i think maybe this is a regression

Expected results:
2 option

1. show the "default" when we use numatune to check the mode, because we didn't set the numa bind mode in guest xml, and the display from numatune is against itself when we change the node set.

2. allow change the nodeset in step 3 (if with cgroup), because we allow change the nodeset even the guest have no numatune settings in libvirt-1.2.15-2.el7.x86_64, and as we change the nodeset via cgroup, we do not use the libnuma API if cgroup is available.

Comment 1 Michal Privoznik 2015-07-13 16:30:47 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2015-July/msg00516.html

Comment 4 hongming 2015-08-27 09:46:19 UTC
Verify it as follows. The result is expected. Move its status to VERIFIED.

# rpm -q libvirt
libvirt-1.2.17-6.el7.x86_64

# virsh start test4
Domain test4 started

# virsh dumpxml test4|grep numatune

# virsh numatune test4
numa_mode      : strict
numa_nodeset   : 


# virsh numatune test4 --mode strict --nodeset 1

# virsh numatune test4
numa_mode      : strict
numa_nodeset   : 1

# virsh dumpxml test4|grep /numatune -B2
  <numatune>
    <memory mode='strict' nodeset='1'/>
  </numatune>


# virsh list
 Id    Name                           State
----------------------------------------------------
 21    test4                          running


# numastat -p `pidof qemu-kvm`

Per-node process memory usage (in MBs) for PID 27929 (qemu-kvm)
                           Node 0          Node 1           Total
                  --------------- --------------- ---------------
Huge                         0.00            0.00            0.00
Heap                         0.00            6.87            6.87
Stack                        0.00            2.09            2.09
Private                      0.02         2033.41         2033.43
----------------  --------------- --------------- ---------------
Total                        0.02         2042.37         2042.39

Comment 6 errata-xmlrpc 2015-11-19 06:41:31 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/RHBA-2015-2202.html


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