Bug 1804603 - <backingStore type='volume'> reports wrong error and doesn't work
Summary: <backingStore type='volume'> reports wrong error and doesn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Peter Krempa
QA Contact: gaojianan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-19 09:13 UTC by Peter Krempa
Modified: 2020-11-19 09:05 UTC (History)
7 users (show)

Fixed In Version: libvirt-6.0.0-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:57:19 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:58:26 UTC

Description Peter Krempa 2020-02-19 09:13:26 UTC
Description of problem:
When explicitly specifying a <backingStore type='volume'> libvirt reports:

"An error occurred, but the cause is unknown" and 


How reproducible:
100%

Steps to Reproduce:
1.
    <disk type='volume' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source pool='test' volume='overlay'/>
      <backingStore type='volume'>
        <format type='qcow2'/>
        <source pool='test' volume='base'/>
        <backingStore/>
      </backingStore>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </disk>

2. virsh start VM
3.

Actual results:
   $ virsh start VM
   error: Failed to start domain VM
   error: An error occurred, but the cause is unknown

Expected results:
   VM starts and uses the proper volume (in -blockdev mode)


Additional info:

Comment 1 Peter Krempa 2020-02-19 09:15:57 UTC
Fixed upstream by:

37f01262ee virDomainDiskTranslateSourcePool: Translate 'volume' disks in whole backing chain
63469116cc virDomainDiskTranslateSourcePool: split code to setup one storage source
bc42d88ffd virDomainDiskTranslateISCSIDirect: Take virStorageSourcePtr instead of virDomainDiskDefPtr
4fca8299c5 virDomainDiskTranslateSourcePoolAuth: Take virStorageSourcePtr instead of virDomainDiskDefPtr
47cad72553 virDomainDiskAddISCSIPoolSourceHost: Take virStorageSourcePtr instead of virDomainDiskDefPtr
e20c5b1703 virDomainDiskAddISCSIPoolSourceHost: Remove ternary operator
4d5093ef75 virDomainDiskAddISCSIPoolSourceHost: Remove 'cleanup' label
5eda34f2e1 virDomainDiskAddISCSIPoolSourceHost: use g_new0 instead of VIR_ALLOC_N
c5b1c14379 virDomainDiskAddISCSIPoolSourceHost: Sanitize handling of string list
4e3e69fed4 qemuBlockStorageSourceGetBackendProps: Report errors on all switch cases

Comment 5 gaojianan 2020-03-03 07:02:04 UTC
Verified on :
libvirt-6.0.0-7.virtcov.el8.x86_64

Step:
1.Edit the vm2 with the following xml:
...
   <disk type='volume' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source pool='default' volume='test.img'/>
      <backingStore type='volume'>
        <format type='qcow2'/>
        <source pool='default' volume='a.iso'/>
        <backingStore/>
      </backingStore>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </disk>
...

2.Try to start the vm
# virsh start vm2
Domain vm2 started

Guest start without any error


qemu cmd line:
...
-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"qcow2","file":"libvirt-3-storage","backing":null}' -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=libvirt-3-format,id=virtio-disk0,bootindex=1 -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/a.iso","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' -blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"qcow2","file":"libvirt-2-storage","backing":null}' -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/test.img","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":"libvirt-2-format"}'
...


Work as expected.

Comment 7 errata-xmlrpc 2020-05-05 09:57:19 UTC
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


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