Description of problem: When creating a new disk, as part of image upload flow, we use a rounded up value for its size. Hence, in order to avoid a need for resize, we should use the exact required size value. Version-Release number of selected component (if applicable): 4.2 How reproducible: 100% Steps to Reproduce: Initiate an image upload. Actual results: Disk is created using a rounded up size. Expected results: Disk should be created using an exact size value: - QCOW2: virtual size defined in the header - RAW: file size Additional info: The rounded up value would still be used in the UI, as we display sizes in GiB.
Verified with the following code: ----------------------------------------- ovirt-engine-4.2.5.3-0.1.el7ev.noarch b36426a9-c5c1-45b0-8b0f-36b3a8e4bfd8 Verified with the following scenario: ----------------------------------------- 1. Upload an image of size 508 MB 2. Verify size of image on storage domain >>>>> Same exact size is displayed '508 Mb' 3. Size in GUI displayed as <1 GB Moving to VERIFIED!