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

Bug 1589665

Summary: WebAdmin: Upload image dialog - not informative enough when image is too small
Product: [oVirt] ovirt-engine Reporter: Yosi Ben Shimon <ybenshim>
Component: Frontend.WebAdminAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Shir Fishbain <sfishbai>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3.2.1CC: aefrat, bugs, ratamir, tjelinek, tnisan
Target Milestone: ovirt-4.3.2Keywords: UserExperience
Target Release: 4.3.2.1Flags: rule-engine: ovirt-4.3+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-19 10:03:21 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:
Attachments:
Description Flags
Upload image dialog
none
Empty raw image none

Description Yosi Ben Shimon 2018-06-11 06:29:02 UTC
Created attachment 1449899 [details]
Upload image dialog

Description of problem:
The upload image dialog is not informative enough when the image is too small (e.g. when the image size ~200Kb).
The error message only says: "The selected file is not a valid image (please refer to the documentation for more information)."

Note that when the image is not compatible with the storage format version, the message is ok: "Uploading an image with qcow2 compat 1.1 is unsupported for storage format type V3."

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.4.2-0.1.el7_3.noarch

How reproducible:
always.

Steps to Reproduce:
1. Create an image on a local machine using qemu-img:
# qemu-img create -f qcow2 -o compat=0.10 test_img.qcow2 10G
# qemu-img info test_img.qcow2
image: test_img.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16
2. In WebAdmin: go to "Disks" tab under "Storage".
3. Click on "Upload" -> "Start".
4. Select the newly created image
5. Click "Start"

Actual results:
See attached screenshot

Expected results:
The error message should be more informative and explain that the image is too small.

Additional info:

Comment 1 Sandro Bonazzola 2019-01-28 09:42:06 UTC
This bug has not been marked as blocker for oVirt 4.3.0.
Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.

Comment 2 Daniel Erez 2019-03-07 18:50:21 UTC
Removed the alignment to 512 bytes validation, as uploading unaligned images is still supported by the daemon.
I.e. uploading and empty cow image is feasible, uploading a blank raw image (0 bytes) is still blocked.

Comment 3 Yosi Ben Shimon 2019-03-17 13:52:49 UTC
Tested using:
ovirt-engine-4.3.2.1-0.1.el7.noarch

The cow image mentioned in the bug description uploaded successfully.
An empty raw image failed to open (attaching screenshot)

Moving to VERIFIED

Comment 4 Yosi Ben Shimon 2019-03-17 13:54:37 UTC
Created attachment 1544989 [details]
Empty raw image

Comment 5 Sandro Bonazzola 2019-03-19 10:03:21 UTC
This bugzilla is included in oVirt 4.3.2 release, published on March 19th 2019.

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