Bug 2037146
Summary: | Better to report error when setting acpi index='0' in device | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | yafu <yafu> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
libvirt sub component: | General | QA Contact: | yalzhang <yalzhang> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | unspecified | ||
Priority: | unspecified | CC: | jdenemar, jtomko, pkrempa, virt-maint, xuzhang, yalzhang, yanqzhan |
Version: | 9.0 | Keywords: | AutomationTriaged, Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-8.1.0-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-11-15 10:03:03 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: | 8.1.0 |
Embargoed: |
Description
yafu
2022-01-05 04:14:05 UTC
The fix is simple enough so we can fix this cosmetic issue. Fixed upstream: commit 6622e3cc33712450cc8bfdfb9a5a0b66e186e18d Author: Peter Krempa <pkrempa> Date: Tue Jan 18 15:43:42 2022 +0100 virDomainDeviceInfoParseXML: Reject '0' value for ACPI index Value of '0' is treated equivalently to when it's not provided by the user. Reject an explicit '0' provided by the user as it would get ignored. In this rare case we can make the XML parser more strict, as libvirt would never format the '<acpi/>' element if the index is '0' thus there are no libvirt-generated XMLs we'd not load back, as of such this is identical to rejecting it in the validation phase. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2037146 Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Michal Privoznik <mprivozn> v8.0.0-104-g6622e3cc33 Test on libvirt-8.1.0-1.el9.x86_64, the result is as expected. # virsh edit rhel error: XML error: Invalid value for attribute 'index' in element 'acpi': Zero is not permitted Failed. Try again? [y,n,i,f,?]: Test on libvirt-8.2.0-1.el9.x86_64: # virsh edit rhel <interface type='network'> <mac address='52:54:00:f5:aa:d5'/> <source network='default'/> <model type='e1000e'/> <acpi index='0'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface> error: XML error: Invalid value for attribute 'index' in element 'acpi': Zero is not permitted Failed. Try again? [y,n,i,f,?]: The result is as expected. 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 (Low: libvirt security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2022:8003 |