Bug 1964744 - Should hit error when blockcopy disk with invalid --format value
Summary: Should hit error when blockcopy disk with invalid --format value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.5
Assignee: Pavel Hrdina
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-26 01:40 UTC by Meina Li
Modified: 2021-11-16 08:40 UTC (History)
5 users (show)

Fixed In Version: libvirt-7.5.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 07:53:34 UTC
Type: Bug
Target Upstream Version: 7.5.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4684 0 None None None 2021-11-16 07:54:08 UTC

Description Meina Li 2021-05-26 01:40:50 UTC
Description of problem:
Should hit error when blockcopy disk with invalid --format value

Version-Release number of selected component (if applicable):
libvirt-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64
qemu-kvm-6.0.0-16.module+el8.5.0+10848+2dccc46d.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a running guest.
# virsh domstate avocado-vt-vm1
running

2. Blockcopy the disk to a file with invalid format
# virsh blockcopy avocado-vt-vm1 vda /tmp/test.img --format fda --transient-job
Block Copy started

Actual results:
Can blockcopy successfully with invalid format for the destination

Expected results:
Should hit error:
error: unsupported configuration: unknown driver format value 'fda'

Additional info:

Comment 1 Pavel Hrdina 2021-05-26 13:10:28 UTC
Broken by upstream commit:

commit 0202467c4ba8663db2304b140af609f93a9b3091
Author: Peter Krempa <pkrempa>
Date:   Wed Apr 14 16:43:22 2021 +0200

    qemu: driver: Use virDomainDiskDefParseSource in qemuDomainBlockCopy

Comment 2 Pavel Hrdina 2021-06-01 13:33:56 UTC
Upstream commits:

9d225ea284 virDomainDiskDefParseSource: parse source bits from driver element
fe6ed00ef7 domain_conf: extract disk driver source bits to its own function

Will be fixed by the next rebase to libvirt-7.5.0.

Comment 3 Meina Li 2021-06-30 06:54:24 UTC
Verified:tested is passed on:
libvirt-7.0.0-4.fc34.x86_64
qemu-kvm-5.2.0-8.fc34.x86_64

Expected result:
# virsh blockcopy lmn vda /tmp/test.img --format fda --transient-job
error: unsupported configuration: unknown driver format value 'fda'

Comment 6 Meina Li 2021-07-14 03:11:27 UTC
Verified Version:
libvirt-7.5.0-1.module+el8.5.0+11664+59f87560.x86_64
qemu-kvm-6.0.0-23.module+el8.5.0+11740+35571f13.x86_64

Verified Steps:
1. Start a guest with the following disk:
# virsh dumpxml lmn | grep /disk -B5
    <disk type='file' device='disk' snapshot='no'>
      <driver name='qemu' type='qcow2' cache='none' detect_zeroes='on' queues='1024'/>
      <source file='/var/lib/libvirt/images/lmn.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </disk>
2. Blockcopy the disk to a file with invalid format
# virsh blockcopy lmn vda /tmp/test.img --format fda --transient-job
error: unsupported configuration: unknown driver format value 'fda'
3. Blockcopy the disk to a file with valid format.
# virsh blockcopy lmn vda /tmp/test.img --format raw --transient-job --pivot --wait --verbose
Block Copy: [100 %]
Successfully pivoted

Comment 8 errata-xmlrpc 2021-11-16 07:53:34 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 (virt:av 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/RHBA-2021:4684


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