Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2229871

Summary: Inconsistent error msg when nonexistent numa nodeset defined in numatune
Product: Red Hat Enterprise Linux 8 Reporter: liang cong <lcong>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED WONTFIX QA Contact: liang cong <lcong>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.9CC: jsuchane, lmen, mprivozn, nanli, virt-maint
Target Milestone: rcKeywords: Automation
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-23 15:04:05 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:

Description liang cong 2023-08-08 06:12:16 UTC
Description of problem:Inconsistent error msg when nonexistent numa nodeset defined in numatune

Version-Release number of selected component (if applicable):
# rpm -q libvirt qemu-kvm
libvirt-8.0.0-22.module+el8.9.0+19544+b3045133.x86_64
qemu-kvm-6.2.0-37.module+el8.9.0+19491+15e62c0a.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a NUMA host
# numactl --hard
available: 2 nodes (0-1)
node 0 cpus: 0 1 2
node 0 size: 5725 MB
node 0 free: 5061 MB
node 1 cpus: 3 4 5
node 1 size: 5990 MB
node 1 free: 5684 MB
node distances:
node   0   1
  0:  10  20
  1:  20  10 

2. Start a guest with nonexistent numa nodeset defined in numatune setting:
<numatune>
          <memory mode="strict" nodeset="1-2"/>
  </numatune>

3. Error msg prompts when start the guest
# virsh start vm1
error: Failed to start domain 'vm1'
error: Invalid value '1-2' for 'cpuset.mems': Invalid argument

4. If start a guest with nonexistent numa nodeset defined in numatune and numa topology setting
<numatune>
          <memory mode="strict" nodeset="1-2"/> <!-- or with restrictive mode-->
  </numatune>
...
<numa>
    <cell id='0' cpus='0' memory='1048576' unit='KiB' />
    <cell id='1' cpus='1' memory='1048576' unit='KiB' />
  </numa>
...

5. Error msg prompts when start the guest
# virsh start vm1
error: Failed to start domain 'vm1'
error: unsupported configuration: NUMA node 2 is unavailable


Actual results:
Nonexistent numa nodeset defined in numatune with and without numa topology have different error messages.

Expected results:
Nonexistent numa nodeset defined in numatune without numa topology should have the same meaningful error message as numa topology defined.

Additional info:
When Nonexistent numa nodeset defined in numatune without numa topology, if set numatune mode with "preferred" and "interleave" mode the error msg is like below:
# virsh start vm1
error: Failed to start domain 'vm1'
error: internal error: Process exited prior to exec: libvirt:  error : unsupported configuration: NUMA node 2 is unavailable
Even though we could see the error, the whole output is different with numa topology defined.

Comment 1 Jaroslav Suchanek 2023-08-09 11:30:12 UTC
Is this reproducible with RHEL-9?

Comment 2 liang cong 2023-08-09 11:49:37 UTC
(In reply to Jaroslav Suchanek from comment #1)
> Is this reproducible with RHEL-9?

No, rhel9 doesn't have this issue.