Bug 1656762

Summary: [libvirt 5.0.0]VM XML Validation does not fail if maxvcpu vs total cpus in numa cell range does not match
Product: [Community] Virtualization Tools Reporter: Satheesh Rajendran <sathnaga>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DEFERRED QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, libvirt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-12-17 12:48:14 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:
Attachments:
Description Flags
vm1.xml none

Description Satheesh Rajendran 2018-12-06 09:41:56 UTC
Created attachment 1512018 [details]
vm1.xml

Description of problem:
---Problem Description---
VMXML( numa cell )validation does not fail if maxvcpu vs total cpus in numa cellid does not match
  
---Steps to Reproduce---
 1. Define a vm(vm1) with two numa cell with 2 vcpus each with maxvcpus as 4

<vcpu placement='static' current='2'>4</vcpu>
<cpu>
    <topology cores="4" sockets="1" threads="1" />
    <numa>
      <cell id='0' cpus='0-1' memory='4194304' unit='KiB'/>
      <cell id='1' cpus='2-3' memory='4194304' unit='KiB'/>
    </numa>
  </cpu>

2. edit vm xml to increase the max vcpus
virsh edit vm1

<vcpu placement='static' current='2'>40</vcpu>
<cpu>
    <topology cores="40" sockets="1" threads="1" />
     <numa>
      <cell id='0' cpus='0-1' memory='4194304' unit='KiB'/>
      <cell id='1' cpus='2-3' memory='4194304' unit='KiB'/>
    </numa>
  </cpu>

3. Save the changes, vm xml saved ----NOK

Expected: VM XML validation should throw an error as numa cell's cpu range mismatch with maxvcpu


Version-Release number of selected component (if applicable):
Env:
Host Kernel: 4.20.0-rc4-gb5bd23361
#libvirtd -V
libvirtd (libvirt) 5.0.0
HW: power8 ppc64le

Comment 1 Daniel Berrangé 2024-12-17 12:48:14 UTC
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.