Bug 1960993
Summary: | disk with storage slice with 0 offset doesn't conform to XML schema | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | zhentang <zhetang> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | zhentang <zhetang> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 9.0 | CC: | hhan, jdenemar, meili, pkrempa, virt-maint, xuzhang |
Target Milestone: | beta | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-7.4.0-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-12-07 21:57:54 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: | 7.4.0 |
Embargoed: |
Description
zhentang
2021-05-17 01:33:56 UTC
The actual XML problem is that 'offset' is 0: error: value of attribute "offset" is invalid; must be an integer greater than or equal to 1 I need to check whether the rest of the code properly supports offset 0 though before fixing the schema. Fixed upstream: commit fac773fab93dc526513d7ced40e1d685e193705c Author: Peter Krempa <pkrempa> Date: Fri May 21 14:53:43 2021 +0200 schema: Allow '0' offset for a <slice> of <disk> Using slice to cut off the end of the image is a perfectly vaid configuration. Use 'unsignedInt' instead of 'positiveInteger' for the 'offset' attribute in the XML schema and modify one test case to cover this use case. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1960993 Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Pavel Hrdina <phrdina> v7.3.0-264-gfac773fab9 libvirtd 7.4.0-1.el9 qemu-kvm 6.0.0-2.el9 ========================================= verified bug-check.xml ... <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none' io='native' copy_on_read='off' discard='ignore' detect_zeroes='on'/> <source file='/tmp/disk-raw'> <slices> <slice type='storage' offset='0' size='104857600'/> </slices> </source> <backingStore/> <target dev='sdb' bus='scsi'/> <iotune> <total_bytes_sec>10000000</total_bytes_sec> <group_name>slice</group_name> </iotune> <alias name='ua-slices'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> ... #virt-xml-validate ~/bug_check.xml /root/bug_check.xml validates # virsh define ~/bug_check.xml Domain 'tztest_ins_me' defined from /root/bug_check.xml |