Bug 1794009

Summary: Incorrect memory loads from edited vm template
Product: OpenShift Container Platform Reporter: Nelly Credi <ncredi>
Component: Console Kubevirt PluginAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: high Docs Contact:
Priority: high    
Version: 4.3.0CC: aos-bugs, fkrepins, gouyang, rhrazdil, tjelinek
Target Milestone: ---   
Target Release: 4.3.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1792101 Environment:
Last Closed: 2020-03-24 14:32:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1792101    
Bug Blocks:    

Description Nelly Credi 2020-01-22 13:52:19 UTC
+++ This bug was initially created as a clone of Bug #1792101 +++

Description of problem:
Create a VM template and edit the flavor of the template, change the memory or just click save without any change, using the template in vm wizard, the memory 2Gb/1.5Gb loads as 2000Gb/1500Gb.

Version-Release number of selected component (if applicable):
4.3.0-0.nightly-2020-01-16-123848

How reproducible:
100%

Steps to Reproduce:
1. Edit vm template's flavor, change the memory or just click save.
2. Use the template to create a VM.
3. Check the memory field on VM wizard.

Actual results:


Expected results:


Additional info:

--- Additional comment from Radim Hrazdil on 2020-01-17 09:24:10 UTC ---

Indeed, when changing custom Memory in template using the flavor dialog, the unit used for memory is MB. But Wizard uses GB and takes the value without conversion

--- Additional comment from Tomas Jelinek on 2020-01-22 11:20:15 UTC ---

Even worse, not only the template. The discrepancy is between new and edit flows. In new VM/template the unit used is GB and in the edit VM/template the unit is MB. And there is no translation between the two.

Lets unify and use Gi on all the places.

Comment 4 Guohua Ouyang 2020-03-20 12:27:15 UTC
The original issue is fixed on 4.3.0-0.nightly-2020-03-19-220321.

However, there is a minor issue about the vm flavor:
On vm overview, the memory is 2GB, click editing, it's "1.862645149230957" Gi in the editing dialog.
The consistency is caused by different units "GB" and "Gi".

BTW, no such issue on OCP4.4, the units are "GiB" in both places.

Comment 6 errata-xmlrpc 2020-03-24 14:32:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0858