Bug 2142519 - Error msg should be more user friendly and precise when attaching memory device without guest numa configured.
Summary: Error msg should be more user friendly and precise when attaching memory devi...
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: khanicov
QA Contact: liang cong
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-14 10:05 UTC by liang cong
Modified: 2022-11-17 03:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-139262 0 None None None 2022-11-14 10:13:21 UTC

Description liang cong 2022-11-14 10:05:34 UTC
Description of problem:
Error msg should be more user friendly and precise when attaching memory device without guest numa configured.

Version-Release number of selected component (if applicable):
# rpm -q libvirt
libvirt-8.9.0-2.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Start a guest vm without maxMemory and guest numa configured.
# virsh start vm1
Domain 'vm1' started

2.Prepare a memory device xml like below:
<memory model='dimm'>
    <source>
      <pagesize unit='KiB'>1048576</pagesize>
      <nodemask>0-1</nodemask>
    </source>
    <target>
      <size unit='KiB'>1048576</size>
      <node>0</node>
    </target>
  </memory>

3.Attach the memory device with xml from step2.
# virsh attach-device vm1 dimm1G.xml 
error: Failed to attach device from dimm1G.xml
error: can't add memory backend for guest node '0' as the guest has only '0' NUMA nodes configured


Actual results:
Unfriendly error msg prompts:
error: can't add memory backend for guest node '0' as the guest has only '0' NUMA nodes configured

Expected results:
The error msg should be more friendly and precise to describe the issue

Additional info:
if define maxMemory and only 1 guest numa cell '0' like below:
<maxMemory slots='16' unit='KiB'>15242880</maxMemory>
...
<numa>
    <cell id='0' cpus='0-1' memory='2097152' unit='KiB'/>
</numa>

Then the guest vm can be started and attach the memory device.
So the error msg for this issue makes user confused. Since the below scenario also has '0' numa node exists in guest.


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