Bug 1619625
| Summary: | 'virsh domblkinfo --all' interrupted by empty cdrom device | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | yafu <yafu> |
| Component: | libvirt | Assignee: | Pavel Mores <pmores> |
| Status: | CLOSED ERRATA | QA Contact: | Han Han <hhan> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 | CC: | dyuan, hhan, jdenemar, jsuchane, lmen, pkrempa, rbalakri, tburke, xuzhang |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-5.9.0-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-05-05 09:43:16 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: | |||
Fixed by 5be0d28b3e fixed handling of sourceless disks in 'domblkinfo' cmd v5.8.0-32-g5be0d28b3e Verified on libvirt-6.0.0-1.module+el8.2.0+5453+31b2b136.x86_64 qemu-kvm-4.2.0-6.module+el8.2.0+5453+31b2b136.x86_64:
1. Start a VM with following disks:
# virsh dumpxml pc|xmllint --xpath //disk -
<disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="/var/lib/libvirt/images/luks-dest" index="3"/>
<backingStore/>
<target dev="sda" bus="scsi"/>
<encryption format="luks">
<secret type="passphrase" usage="/var/lib/libvirt/images/luks-dest"/>
</encryption>
<alias name="scsi0-0-0-0"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
</disk><disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/var/lib/libvirt/images/boot.iso" index="2"/>
<backingStore/>
<target dev="sdb" bus="scsi"/>
<readonly/>
<alias name="scsi0-0-0-1"/>
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
</disk><disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="/tmp/sdc" index="1"/>
<backingStore/>
<target dev="sdc" bus="scsi"/>
<alias name="scsi0-0-0-2"/>
<address type="drive" controller="0" bus="0" target="0" unit="2"/>
</disk>
Check block info by domblkinfo --all
# virsh domblkinfo --all pc
Target Capacity Allocation Physical
--------------------------------------------------
sda 10737418240 9099276288 10737684480
sdb 638582784 638582784 638582784
sdc 104857600 8192 104857600
Check cdrom block info only:
# virsh domblkinfo pc sdb
Capacity: 638582784
Allocation: 638582784
Physical: 638582784
virsh only. I will not cover the test 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, 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/RHBA-2020:2017 |
Description of problem: 'virsh domjobinfo --all' interrupted by empty cdrom device Version-Release number of selected component (if applicable): libvirt-4.5.0-7.el7.x86_64 qemu-kvm-rhev-2.12.0-11.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Prepare a guest with empty cdrom device: #virsh dumpxml iommu1 <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='writethrough'/> <source file='/nfs-images/yafu/76.qcow2'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='sdb' bus='scsi'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/test.raw'/> <target dev='sdc' bus='virtio'/> <alias name='ua-04c8decd-4e33-4023-84de-a2205c777af6'/> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </disk> 2.Check the block list: #virsh domblklist iommu1 Target Source ------------------------------------------------ sda /nfs-images/yafu/76.qcow2 sdb - sdc /var/lib/libvirt/images/test.raw 3.Execute 'virsh domjobinfo --all": # virsh domblkinfo iommu1 --all Target Capacity Allocation Physical ----------------------------------------------------- sda 10737418240 15179927552 15150153728 error: invalid argument: disk 'sdb' does not currently have a source assigned Actual results: 'virsh domjobinfo --all' interrupted by empty cdrom device Expected results: 'virsh domjobinfo --all' should show all the block device info. Additional info: