Bug 1596096 - 'virsh vol-dumpxml' failed to get vol info for images created with host_cdrom json backing when the cdrom is empty
Summary: 'virsh vol-dumpxml' failed to get vol info for images created with host_cdrom...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.1
Assignee: Virtualization Maintenance
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-28 09:08 UTC by yafu
Modified: 2021-02-15 07:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-15 07:39:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yafu 2018-06-28 09:08:33 UTC
Description of problem:
'virsh vol-dumpxml' failed to get vol info for images created with host_cdrom json backing when the cdrom is empty

Version-Release number of selected component (if applicable):
libvirt-4.4.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Create backing file with host_cdrom json backing and the cdrom is empty:
# qemu-img create -f qcow2 -b 'json:{"file.driver":"host_cdrom", "file.filename":"/dev/sr0"}' /var/lib/libvirt/images/host_cdrom.img
Formatting '/var/lib/libvirt/images/host_cdrom.img', fmt=qcow2 size=1073741312 backing_file=json:{"file.driver":"host_cdrom",, "file.filename":"/dev/sr0"} cluster_size=65536 lazy_refcounts=off refcount_bits=16

2.Refresh the pool:
#virsh pool-refresh default
Pool default refreshed

3.Execute 'virsh vol-dumpxml':
#virsh vol-dumpxml host_cdrom.img default
error: cannot read header '/dev/sr0': Input/output error


Actual results:
'virsh vol-dumpxml' failed to get vol info for images created with host_cdrom json backing when the cdrom is empty.


Expected results:
'virsh vol-dumpxml' should work well for images created with host cdrom json backing

Additional info:
1.Can get images info successfully with 'qemu-img info'
# qemu-img info /var/lib/libvirt/images/host_cdrom.img
image: /var/lib/libvirt/images/host_cdrom.img
file format: qcow2
virtual size: 1.0G (1073741312 bytes)
disk size: 196K
cluster_size: 65536
backing file: json:{"file.driver":"host_cdrom", "file.filename":"/dev/sr0"}
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

Comment 2 Han Han 2018-07-11 03:16:29 UTC
Send a patch to upstream: https://www.redhat.com/archives/libvir-list/2018-July/msg00655.html

Comment 4 Jaroslav Suchanek 2019-04-24 12:40:33 UTC
This bug is going to be addressed in the next major release.

Comment 7 RHEL Program Management 2021-02-15 07:39:50 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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