Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1786403
Summary: | [Regression]The virt-sparsify command fails when handling the qcow2 image | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | YongkuiGuo <yoguo> | ||||
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||
Status: | CLOSED NOTABUG | QA Contact: | YongkuiGuo <yoguo> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 8.2 | CC: | ptoscano, ymao | ||||
Target Milestone: | rc | Keywords: | Regression | ||||
Target Release: | 8.0 | ||||||
Hardware: | x86_64 | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-07-03 04:15:08 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: | |||||||
Bug Depends On: | 1798148, 1801219 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
YongkuiGuo
2019-12-25 03:24:07 UTC
Created attachment 1647576 [details]
virt-sparsify log
Here's a smaller reproducer: $ qemu-img create -f qcow2 test1.qcow2 1G $ guestfish -a test1.qcow2 run : mkfs xfs /dev/sda : mount /dev/sda / : fill 1 100M /test : sync : rm /test $ virt-sparsify test1.qcow2 test2.qcow2 $ file test?.qcow2 test1.qcow2: QEMU QCOW2 Image (v3), 1073741824 bytes test2.qcow2: QEMU QCOW2 Image (v3), 1073741824 bytes $ ls -lh test?.qcow2 -rw-r--r--. 1 rjones rjones 111M Mar 2 12:37 test1.qcow2 -rw-r--r--. 1 rjones rjones 103M Mar 2 12:37 test2.qcow2 $ du -sh test?.qcow2 111M test1.qcow2 103M test2.qcow2 Using this we can more easily try different formats and filesystems. qcow2 xfs FAILS (see above) raw xfs OK qcow2 ext4 FAILS I was testing this with qemu-4.2.0-4.fc32.x86_64 I will need to go back to earlier versions of qemu to see if this ever worked before / what broke it. This is weird, the bug only happens when the backend is libvirt (not direct). export LIBGUESTFS_BACKEND=direct "fixes" it ... I couldn't find a way to reproduce this reliably. In particular the bug seemed to go away when I upgraded libvirt from 5.10 to 6.0. Which version of libvirt were you using for this test, and does it work with the latest libvirt in RHEL AV? (In reply to Richard W.M. Jones from comment #3) > This is weird, the bug only happens when the backend is libvirt (not direct). > export LIBGUESTFS_BACKEND=direct "fixes" it ... Thanks for providing the simpler reproducer. I have tried and indeed the virt-sparsify command works when the backend is 'direct'. (In reply to Richard W.M. Jones from comment #4) > I couldn't find a way to reproduce this reliably. In particular the bug > seemed to go away when I upgraded libvirt from 5.10 to 6.0. Which > version of libvirt were you using for this test, and does it work > with the latest libvirt in RHEL AV? The libvirt version for test is 'libvirt-5.10.0-2.module+el8.2.0+5274+60f836b5.x86_64'. I upgraded libvirt to the latest version(libvirt-6.0.0-7.module+el8.2.0+5869+c23fe68b.x86_64), but failed to run the virt-sparsify command because of bug 1798148. Did you test on fedora 32? I use RHEL8.2 bare metal for this test. (In reply to YongkuiGuo from comment #5) > The libvirt version for test is > 'libvirt-5.10.0-2.module+el8.2.0+5274+60f836b5.x86_64'. I upgraded libvirt > to the latest version(libvirt-6.0.0-7.module+el8.2.0+5869+c23fe68b.x86_64), > but failed to run the virt-sparsify command because of bug 1798148. > Did you test on fedora 32? I use RHEL8.2 bare metal for this test. I was using Fedora (Rawhide) but I had patched my copy of virt-sparsify with a non-upstream patch[1] that fixes the bug 1798148 problem. Because that is not an option for RHEL, I guess we will need to wait for that other bug to be fixed first. [1] https://www.redhat.com/archives/libguestfs/2020-February/msg00013.html
> I was using Fedora (Rawhide) but I had patched my copy of virt-sparsify
> with a non-upstream patch[1] that fixes the bug 1798148 problem. Because
> that is not an option for RHEL, I guess we will need to wait for that other
> bug to be fixed first.
>
Ok, i get it.
Can not reproduce this issue with the latest libvirt version (libvirt-6.0.0-8, fixed version for bug 1798148). Steps: $ qemu-img create -f qcow2 test1.qcow2 1G $ guestfish -a test1.qcow2 run : mkfs xfs /dev/sda : mount /dev/sda / : fill 1 100M /test : sync : rm /test $ virt-sparsify test1.qcow2 test2.qcow2 $ du -sh test?.qcow2 114M test1.qcow2 4.2M test2.qcow2 So I also believe this is now fixed (I'm using libvirt-6.3.0-1.module+el8.3.0+6478+69f490bb.x86_64) Can we close this bug? (In reply to Richard W.M. Jones from comment #9) > So I also believe this is now fixed (I'm using > libvirt-6.3.0-1.module+el8.3.0+6478+69f490bb.x86_64) > > Can we close this bug? Yes, I think we can close it. |