Bug 1792101 - Incorrect memory loads from edited vm template
Summary: Incorrect memory loads from edited vm template
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.4.0
Assignee: Tomas Jelinek
QA Contact: Nelly Credi
Depends On:
Blocks: 1794009
TreeView+ depends on / blocked
Reported: 2020-01-17 03:26 UTC by Guohua Ouyang
Modified: 2020-05-04 11:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: the VM templates used the memory values in MiB while the VM used it in GiB. Consequence: If the VM had e.g. 500MiB memory, the VM created from it was requesting 500GiB. This caused the VM to not to be scheduled. Fix: Unified the units. Now Gi is used everywhere. Result: The user can use the template to create a VM without adjusting the memory size.
Clone Of:
: 1794009 (view as bug list)
Last Closed: 2020-05-04 11:24:47 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 4051 0 None closed Bug 1792101: Incorrect memory loads from edited vm template 2020-05-07 02:12:20 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:25:19 UTC

Description Guohua Ouyang 2020-01-17 03:26:25 UTC
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):

How reproducible:

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:

Comment 1 Radim Hrazdil 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

Comment 2 Tomas Jelinek 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 5 Guohua Ouyang 2020-02-20 02:39:34 UTC
verified on 4.4.0-0.nightly-2020-02-17-022408

Comment 7 errata-xmlrpc 2020-05-04 11:24:47 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.


Note You need to log in before you can comment on or make changes to this bug.