Description of problem: When uploading a raw image into a qcow2 disk, the transfer fails by qemu-img upon invoking VerifyUntrustedVolume: err='qemu-img: Could not open \'/rhev/data-center/mnt/.../images/...\': Failed to get shared "write" lock\nIs another process using the image Since uploading a raw image is done using an NBD server, StopNbdServer should be invoked *before* verifying untrusted volume - as it takes a lock on the image. Note: uploading into raw disk does not fail due to a bug 1741620 in qemu. Version-Release number of selected component (if applicable): 4.3.6 How reproducible: 100% Steps to Reproduce: Upload a raw image into a cow disk using image transfer api. E.g. using upload_disk script: https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_disk.py $ ./upload_disk.py --engine-url <engine_url> --username admin@internal --password-file pass --sd-name data1 <raw_image> --disk-format cow Actual results: Fails on verify untrusted volume phase. Expected results: Should complete successfully.
Tested on: ovirt-engine-4.3.6.4-0.1.el7.noarch Actual result: The image was uploaded successfully. 2019-09-01 14:54:18,617+03 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engineScheduled-Thread-31) [a131fa43-d1ab-4c4c-8651-b32a18aae2b4] EVENT_ID: TRANSFER_IMAGE_SUCCEEDED(1,032), Image Upload with disk test.raw succeeded. * Tested on 4.3.6-2 and 4.3.6-3 as well - failed as expected. ** Tested on file and block domains Moving to VERIFIED
This bugzilla is included in oVirt 4.3.6 release, published on September 26th 2019. Since the problem described in this bug report should be resolved in oVirt 4.3.6 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.