Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1725620

Summary: upload image fails for small qcow images on file domains
Product: [oVirt] ovirt-engine Reporter: Daniel Erez <derez>
Component: BLL.StorageAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Yosi Ben Shimon <ybenshim>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bugs, tnisan
Target Milestone: ovirt-4.3.5Flags: pm-rhel: ovirt-4.3+
Target Release: 4.3.5.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.5.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-30 14:08:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Erez 2019-07-01 07:18:18 UTC
Description of problem:
Uploading a small qcow image to a file domain fails on imageio-daemon.
Ticket's transfer size should include a qcow header overhead to mitigate this issue.

How reproducible:
100%

Steps to Reproduce:
1. Create a small qcow image (e.g. 100K).
2. Upload to a file domain.

Actual results:
The following error is logged in daemon.log:
"Client error: You are not allowed to access this resource: Requested range out of allowed range"

Expected results:
Upload should be completed successfully.

Additional info:
Can be tested using upload_disk script:
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_disk.py

Comment 1 Yosi Ben Shimon 2019-07-04 13:16:54 UTC
Tested using:
ovirt-engine-4.3.5.2-0.1.el7.noarch

Created a small qcow image (100K):

$ qemu-img create -f qcow2 -o compat=0.10 100k_img.qcow2 100K

$ qemu-img info 100k_img.qcow2 
image: 100k_img.qcow2
file format: qcow2
virtual size: 100K (102400 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16


The upload went fine without any issues (using the UI).

From the imageio-proxy log:

(Thread-19 ) INFO 2019-07-04 16:13:50,262 auth:197:auth2:(add_signed_ticket) Adding new ticket: <Ticket id=u'9c578295-4bbe-4d76-a083-159d56f503ee', transfer_id=u'b2d76628-ac54-4abb-b32b-0aa02bb682d2', url=u'https://storage-ge6-vdsm1.scl.lab.tlv.redhat.com:54322' timeout=35998.73717188835 at 0x7f5606218d50>
(Thread-20 ) INFO 2019-07-04 16:13:53,993 images:39:root:(options) [10.36.118.8] OPTIONS
(Thread-20 ) INFO 2019-07-04 16:13:54,004 connectionpool:735:requests.packages.urllib3.connectionpool:(_new_conn) Starting new HTTPS connection (1): storage-ge6-vdsm1.scl.lab.tlv.redhat.com
(Thread-21 ) INFO 2019-07-04 16:13:54,569 images:159:root:(put) [10.36.118.8] WRITE size=196616 offset=0 flush=True ticket=9c578295-4bbe-4d76-a083-159d56f503ee
(Thread-21 ) INFO 2019-07-04 16:13:54,572 connectionpool:735:requests.packages.urllib3.connectionpool:(_new_conn) Starting new HTTPS connection (1): storage-ge6-vdsm1.scl.lab.tlv.redhat.com
(Thread-22 ) INFO 2019-07-04 16:13:57,850 auth:211:auth2:(delete_ticket) Deleting ticket u'9c578295-4bbe-4d76-a083-159d56f503ee'

Qemu-img info (from /rhev/data-center/...):

[root@storage-ge6-vdsm2 5edac4c5-057b-4914-9b2d-fcb1299e32e9]# qemu-img info 62536023-b320-4b08-99d4-b975e7dbfbc4
image: 62536023-b320-4b08-99d4-b975e7dbfbc4
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16

Moving to VERIFIED

Comment 2 Sandro Bonazzola 2019-07-30 14:08:27 UTC
This bugzilla is included in oVirt 4.3.5 release, published on July 30th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.5 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.