Bug 2174397
Summary: | [snapshot] failed to validate snapshot xml with "<snapshotDeleteInProgress/>" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | yisun |
Component: | libvirt | Assignee: | Pavel Hrdina <phrdina> |
libvirt sub component: | General | QA Contact: | yisun |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | low | CC: | jdenemar, lmen, pkrempa, virt-maint, ymankad |
Version: | 9.2 | Keywords: | Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-9.2.0-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-11-07 08:30:47 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: | 9.2.0 |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1519002 |
Description
yisun
2023-03-01 13:25:32 UTC
In cases when the user want's to redefine such a snapshot we need to allow it wven with validation. Upstream commit: commit 61d51c9c418dd3c77794519a5f66a02118b11326 Author: Pavel Hrdina <phrdina> Date: Wed Mar 8 13:02:37 2023 +0100 domainsnapshot: add snapshotDeleteInProgress to RNG schema preverified with libvirt-9.2.0-1.el9.x86_64: 1. check rng file # cat /usr/share/libvirt/schemas/domainsnapshot.rng ... <define name="snapshotDeleteInProgress"> <optional> <element name="snapshotDeleteInProgress"> <empty/> </element> </optional> </define> … <ref name="storageSourceExtra"/> <ref name="snapshotDeleteInProgress"/> … <ref name="storageSourceExtra"/> <ref name="snapshotDeleteInProgress"/> </interleave> 2. use same steps as comment0, from step 6 it works as follow: [root@lenovo-sr630-14 ~]# virsh snapshot-delete vm1 s2 error: Failed to delete snapshot s2 error: operation failed: domain is no longer running [root@lenovo-sr630-14 ~]# virsh snapshot-dumpxml vm1 s1 | grep InProgress -a10 <domainsnapshot> <name>s1</name> <state>disk-snapshot</state> <creationTime>1681133878</creationTime> <memory snapshot='no'/> <disks> <disk name='vda' snapshot='external' type='file'> <snapshotDeleteInProgress/> <driver type='qcow2'/> <source file='/var/lib/libvirt/images/jeos-27-x86_64.s1'/> </disk> </disks> <domain type='kvm'> <name>vm1</name> <uuid>6b71c477-6392-4305-be34-11a4672aab73</uuid> <metadata> <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> <libosinfo:os id="http://redhat.com/rhel/9.2"/> [root@lenovo-sr630-14 ~]# virsh snapshot-dumpxml vm1 s1 --security-info|virt-xml-validate - - validates <=== it's correct now test with libvirt-9.3.0-2.el9.x86_64 and result is PASS 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 (Moderate: 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-2023:6409 |