Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Still hit the issue in qemu-kvm-6.2.0-1.el9. And change the priority to Medium.
Comment 3Stefano Garzarella
2022-03-15 14:23:25 UTC
This issue seems similar to what we fixed here: https://gitlab.com/qemu-project/qemu/-/commit/d24f80234b39d2d5c0d91e63b5e4569d37b2399e
Since QEMU 6.1 supports write_zeroes, I think we have the same problem: rbd doesn't support write beyond the current file size.
So we should do the same workaround and resize the file before requesting a write_zeroes that exceeds its current size.
Comment 8Stefano Garzarella
2022-03-17 16:43:07 UTC
Verified this bug as below.
Tested with:
qemu-kvm-7.0.0-1.el9
kernel-5.14.0-80.el9.x86_64
Steps:
1. Create a source local image.
# qemu-img create -f raw test.img 5g
# qemu-io -f raw -c 'write -P 1 0 1.9G' test.img
2. Convert the local image to a qcow2 image over RBD.
# qemu-img convert -f raw -O qcow2 test.img rbd:rbd/image_convert_remote.qcow2 -p
(100.00/100%)
Results:
As above, converting successfully.
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 (Moderate: qemu-kvm security, 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/RHSA-2022:7967
Description of problem: As the subject, and 'qemu-img convert' to Raw images over RBD works well. Version-Release number of selected component (if applicable): qemu-kvm-6.1.0-6.el9 kernel-5.14.0-11.el9.x86_64 How reproducible: 100% Steps to Reproduce: 1. Configure the RBD server info in the client end. # cat > /etc/ceph/ceph.conf<<EOF [global] cluster = testcluster fsid = d5ce4d4d-6a72-40e8-b59e-57a5b075a50a mon initial members = ibm-x3650m4-06 mon host = ${rbd_server_ip} public network = 10.73.114.0/24 cluster network = 10.73.114.0/24 auth cluster required = cephx auth service required = cephx auth client required = cephx osd journal size = 1024 osd pool default size = 1 osd pool default min size = 1 osd pool default pg num = 33 osd pool default pgp num = 33 osd crush chooseleaf type = 1 EOF # cat > /etc/ceph/ceph.client.admin.keyring<<EOF [client.admin] key = ${key} caps mds = "allow *" caps mgr = "allow *" caps mon = "allow *" caps osd = "allow *" EOF 2. Prepare a source image to convert. # qemu-img create -f raw test.img 5g # qemu-io -f raw -c 'write -P 1 0 1.9G' test.img # qemu-img info test.img image: test.img file format: raw virtual size: 5 GiB (5368709120 bytes) disk size: 1.9 GiB 3. Convert the source image to a qcow2 image over RBD # qemu-img convert -f raw -O qcow2 test.img rbd:rbd/image_convert_remote.qcow2 -p qemu-img: rbd request failed: cmd 4 offset 2038956032 bytes 1703936 flags 256 task.ret -22 (Invalid argument) qemu-img: error while writing at byte 2038431744: Invalid argument Actual results: As above, converting failed. Expected results: Converting successes with no error. Additional info: Converting the source raw image to a raw image over RBD works fine. # qemu-img convert -f raw -O raw test.img rbd:rbd/image_convert_remote.img -p (100.00/100%)