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 856999 - libvirt should check the range of setting nodeset
Summary: libvirt should check the range of setting nodeset
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-13 10:41 UTC by hongming
Modified: 2014-04-04 21:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-04 21:00:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description hongming 2012-09-13 10:41:15 UTC
Description of problem:
libvirt should check the range of setting nodeset with mode='preferred' or ‘interleave ’ when start guest.


Version-Release number of selected component (if applicable):
libvirt-0.10.1-1.el6.x86_64
qemu-kvm-0.12.1.2-2.307.el6.x86_64 

How reproducible:
100% 

Steps to Reproduce:
# virsh nodeinfo
CPU model:           x86_64
CPU(s):              160
CPU frequency:       1064 MHz
CPU socket(s):       1
Core(s) per socket:  10
Thread(s) per core:  2
NUMA cell(s):        8
Memory size:         1058739720 KiB

# virsh edit testnuma1

<domain type='kvm'>
 .......
  <numatune>
    <memory mode='preferred'  nodeset='10'/>
  </numatune>
......
</domain>

Domain testnuma1 XML configuration edited.

# virsh start testnuma1
Domain testnuma1 started

# virsh destroy testnuma1
Domain testnuma1 destroyed

# virsh edit testnuma1
<domain type='kvm'>
.......
  <numatune>
    <memory mode='interleave' nodeset='10-15'/>
  </numatune>
......
</domain>

Domain testnuma1 XML configuration edited.


# virsh start testnuma1
Domain testnuma1 started


  
Actual results:
When mode='preferred' or ‘interleave ’  and  the setting nodeset is out of range ,guest still can be start successfully.


Expected results:
libvirt should check the range of setting nodeset with mode='preferred' or ‘interleave ’ when start guest. 

Additional info:

Comment 2 zhenfeng wang 2012-09-13 11:01:45 UTC
when set the numa mode  strict,there had two places which were not exactly
# virsh nodeinfo
CPU model:           x86_64
CPU(s):              160
CPU frequency:       1064 MHz
CPU socket(s):       1
Core(s) per socket:  10
Thread(s) per core:  2
NUMA cell(s):        8
Memory size:         1058739720 KiB


# virsh edit testnuma1

<domain type='kvm'>
 .......
  <numatune>
    <memory mode='strict'  nodeset='1'/>
  </numatune>
......
</domain>

1 the problem 1
you should pose a RFE for numatune to check setting
node number bigger than the host maximum when domain is unlive, but
not

virsh numatune testnuma1 --nodeset 9
....
virsh numatune testnuma1 --nodeset 1023

2 the problem 2
It  reported a incorrect error when set the numatune number exceed 1023
# virsh numatune testnuma1 --nodeset 1024
> > error: Unable to change numa parameters
> > error: internal error Failed to parse nodeset

Comment 3 Wayne Sun 2012-09-21 10:34:56 UTC
When mode with 'interleave' or 'preferred', start domain with nodeset out of range, we will get the warning msg in /var/log/libvirt/qemu/$domain_name.log

2012-09-21 10:29:14.349+0000: 31901: warning : qemuProcessInitNumaMemoryPolicy:1752 : nodeset is out of range, there is only 1 NUMA nodes on host
set_mempolicy: Invalid argument


IMHO, I think this is enough for this problem, no need to change the warning msg as error and fail the domain start since the domain will working normal without setting to the wrong node.

Comment 5 Osier Yang 2013-04-22 09:42:46 UTC
(In reply to comment #3)
> When mode with 'interleave' or 'preferred', start domain with nodeset out of
> range, we will get the warning msg in /var/log/libvirt/qemu/$domain_name.log
> 
> 2012-09-21 10:29:14.349+0000: 31901: warning :
> qemuProcessInitNumaMemoryPolicy:1752 : nodeset is out of range, there is
> only 1 NUMA nodes on host
> set_mempolicy: Invalid argument

A error is better. Patch posted:

https://www.redhat.com/archives/libvir-list/2013-April/msg01523.html

Comment 6 Osier Yang 2013-04-22 09:49:10 UTC
(In reply to comment #2)
> when set the numa mode  strict,there had two places which were not exactly
> # virsh nodeinfo
> CPU model:           x86_64
> CPU(s):              160
> CPU frequency:       1064 MHz
> CPU socket(s):       1
> Core(s) per socket:  10
> Thread(s) per core:  2
> NUMA cell(s):        8
> Memory size:         1058739720 KiB
> 
> 
> # virsh edit testnuma1
> 
> <domain type='kvm'>
>  .......
>   <numatune>
>     <memory mode='strict'  nodeset='1'/>
>   </numatune>
> ......
> </domain>
> 
> 1 the problem 1
> you should pose a RFE for numatune to check setting
> node number bigger than the host maximum when domain is unlive, but
> not
> 
> virsh numatune testnuma1 --nodeset 9
> ....
> virsh numatune testnuma1 --nodeset 1023

No, we don't want to enforce the checking for inactive domain, system can have
more CPUs/nodes hotplugged.

> 
> 2 the problem 2
> It  reported a incorrect error when set the numatune number exceed 1023
> # virsh numatune testnuma1 --nodeset 1024
> > > error: Unable to change numa parameters
> > > error: internal error Failed to parse nodeset

It's not "incorrect". Just not that clear enough, not that deserved to fix.

Comment 7 Osier Yang 2013-04-24 15:26:53 UTC
commit 148edcce6642c6c510a69189de0f7c7936035585
Author: Osier Yang <jyang>
Date:   Mon Apr 22 15:14:56 2013 +0800

    util: Error out if the numa nodeset is out of range
    
    Instead of a silent warning, it's better to error out if the
    numa nodeset is out of range. Just like for numa node larger
    than NUMA_NUM_NODES.

Comment 8 Jiri Denemark 2013-06-11 09:56:03 UTC
We decided not to rebase libvirt in RHEL 6.5 to avoid stability issues
we faced in 6.4. This bug has already been fixed upstream but it is
considered unsuitable for backporting to RHEL 6.5 because at least one
of the following conditions is met:

- this bug requires new API(s), which we cannot introduce without
  rebasing libvirt
- the patches required to address this bug are complex or invasive
  causing the backport to be too risky
- this bug is not important enough to justify backporting non-trivial
  patches for it

Thus I'm pushing this bug to RHEL 6.6 (and setting Upstream keyword to
indicate we have patches upstream) for now. If you don't agree with
this resolution, please, give us reasons which you think are strong
enough for us to reevaluate the decision not to backport patches for
this bug.

Comment 12 RHEL Program Management 2014-04-04 21:00:27 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.


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