Bug 1529293

Summary: upload image alignment validation
Product: [oVirt] ovirt-imageio Reporter: Daniel Erez <derez>
Component: GeneralAssignee: Nir Soffer <nsoffer>
Status: CLOSED WONTFIX QA Contact: Raz Tamir <ratamir>
Severity: medium Docs Contact:
Priority: low    
Version: 1.1.0CC: amureini, bugs, tnisan, ylavi
Target Milestone: ---Flags: sbonazzo: ovirt-4.2-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-31 17:44:38 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:
Bug Depends On:    
Bug Blocks: 1527050    

Description Daniel Erez 2017-12-27 13:13:26 UTC
Description of problem:
Upon uploading an image, its sector size alignment should be validated.
I.e. validate that the image's size is a multiple of 512 bytes.
The validation should be done both in the proxy and daemon.

Additional info:
Similar validation should be done in the webadmin: bug 1529292

Comment 1 Nir Soffer 2017-12-27 16:19:35 UTC
This change is needed to resolve bug 1527050, so this should be 4.2.2 bug - or
bug 1527050 should be 4.3 bug.

Comment 2 Tal Nisan 2017-12-28 08:59:36 UTC
Fixing this bug in the Engine is a pretty simple validation and it seems that the change in the proxy and the daemon will entail some big refactoring along with it that might be too risky for 4.2.2, if you can make it within 4.2.1 timeline I'm up for it but if not it will be 4.3 and perhaps a zstream after 4.2.2

Comment 3 Nir Soffer 2017-12-28 19:01:37 UTC
(In reply to Tal Nisan from comment #2)
> Fixing this bug in the Engine is a pretty simple validation and it seems
> that the change in the proxy and the daemon will entail some big refactoring
> along with it that might be too risky for 4.2.2, if you can make it within
> 4.2.1 timeline I'm up for it but if not it will be 4.3 and perhaps a zstream
> after 4.2.2

We need to:
- validate offset and size in ui, proxy and daemon - this is trivial change that
  we can and should do this for 4.2.1.
- remove the unneeded code supporting unaligned offset and size - easy change
  we probably can do in 4.2.1
- implement concurrent copy - this is harder and more risky, not sure it is a good
  idea to do this for 4.2.1, so maybe best do this in 4.3 and backport to 4.2.z
  if possible.

Comment 4 Nir Soffer 2018-01-07 17:21:42 UTC
Suggesting for 4.2.1 - validation is trivial, and we need to block the unwanted
request soon before someone is relying on this behavior.

Comment 5 Allon Mureinik 2018-01-09 14:34:56 UTC
(In reply to Nir Soffer from comment #4)
> Suggesting for 4.2.1 - validation is trivial, and we need to block the
> unwanted
> request soon before someone is relying on this behavior.

Not critical for 4.2.1, but let's have it done for 4.2.2.

Comment 6 Nir Soffer 2018-01-15 16:48:39 UTC
Regarding comment 3, we want to handle only step 1 in this bug.

The rest is related to scale bug 1527050.

Comment 7 Daniel Erez 2018-01-31 17:44:38 UTC
As creating an empty qcow image results in a non-aligned image (see bug 1539104), closing this bug for now.