Bug 1741893 - uploading raw image to cow disk fails on verify volume
Summary: uploading raw image to cow disk fails on verify volume
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.3.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.3.6
: 4.3.6.4
Assignee: Daniel Erez
QA Contact: Yosi Ben Shimon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-16 10:59 UTC by Daniel Erez
Modified: 2019-09-26 19:43 UTC (History)
2 users (show)

Fixed In Version: ovirt-engine-4.3.6.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-26 19:43:29 UTC
oVirt Team: Storage
Embargoed:
pm-rhel: ovirt-4.3+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 102658 0 master MERGED core: image transfer - fix upload of raw image with NBD 2019-08-20 09:35:53 UTC
oVirt gerrit 102695 0 ovirt-engine-4.3 MERGED core: image transfer - fix upload of raw image with NBD 2019-08-20 13:12:04 UTC

Description Daniel Erez 2019-08-16 10:59:59 UTC
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.

Comment 1 Yosi Ben Shimon 2019-09-01 11:59:35 UTC
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

Comment 2 Sandro Bonazzola 2019-09-26 19:43:29 UTC
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.


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