Bug 2078699

Summary: Unreasonable values for disk size when creating VM from template
Product: OpenShift Container Platform Reporter: Germano Veit Michel <gveitmic>
Component: Console Kubevirt PluginAssignee: Yaacov Zamir <yzamir>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: low Docs Contact:
Priority: low    
Version: 4.10CC: aos-bugs, cnv-qe-bugs, gouyang, hstastna, openshift-bugzilla-robot
Target Milestone: ---Keywords: Reopened
Target Release: 4.10.z   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-07 11:39:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 2046598    
Bug Blocks:    
Description Flags
screenshot at step 6
My 10091 Pebibyte disk at step 8 none

Description Germano Veit Michel 2022-04-26 03:51:19 UTC
Description of problem:

1. Go to Virtualization -> Templates (sources were auto-populated by setting default StorageClass)
2. Create new VM with Wizard
3. Select RHEL8 (or any other)
4. Next
5. Customize Virtual Machine
6. Click Storage

Note down the value in 'Size':

Name        Source   Size             Drive   Interface   Storage class   
rootdisk    pvc      11362347344 B.   Disk    virtio      synology

7. Click the 3 dots for the disk and select 'Edit'

8. In the size field, the same number (in my case 11362347344) appears, but the unit is now GB, not B. This results in a ridiculously large disk.

* The Size column should use a more human readable unit for disk size, bytes it not it. GB would make more sense for Virtual Machine disks in general.
* The unit changed from B to GB, multiplying the size of my disk at step 7.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
As above

Comment 1 Germano Veit Michel 2022-04-26 03:53:03 UTC
Created attachment 1874990 [details]
screenshot at step 6

Comment 2 Germano Veit Michel 2022-04-26 03:55:06 UTC
Created attachment 1874991 [details]
My 10091 Pebibyte disk at step 8

Comment 4 Guohua Ouyang 2022-05-06 07:36:43 UTC
This problem should be fixed in newer 4.10.z build, by editing the disk, it didn't saved a large disk even through a large number shows in storage tab at first.
The only issue is a large number shows in storage tab at first, I think we will leave it unless customer request fixing.

Comment 5 Tal Nisan 2022-05-24 11:25:59 UTC
Closing as WONTFIX based on comment #4, feel free to reopen if a customer encounters it again and requests a fix

Comment 6 Guohua Ouyang 2022-06-13 09:56:13 UTC
Reopen this bug based on the feedback from PM.
The only issue is the size of the root disk shows in individual Bytes, reproduce steps:
1. create vm from a template which has auto-update boot source
2. enter into customize mode
3. check the root disk size on storage step, it shows something like "34087042032 B"
4. check the root disk size on the review step, it shows something like "34087042032 B"

Comment 7 Hilda Stastna 2022-06-13 17:24:38 UTC
Hi Guohua,

I cannot reproduce in 4.11, also there is no any "Storage step" anymore (as mentioned in the Comment 6), we only have the Disks tab when customizing VM,
and there is no any issue with displaying disk size in bytes (in the column or when editing the disk - doesn't matter), no matter if auto-update boot source or not.
Could you, please, check it and make sure/add more info about the steps to reproduce? Thanks!

Comment 15 Guohua Ouyang 2022-06-21 03:18:32 UTC
*** Bug 2099439 has been marked as a duplicate of this bug. ***

Comment 19 Guohua Ouyang 2022-06-23 05:16:23 UTC
verified on 4.10.0-0.nightly-2022-06-23-003834, the disk size are looking good everywhere.

Comment 22 errata-xmlrpc 2022-07-07 11:39:56 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 (OpenShift Container Platform 4.10.21 bug fix update), and where to find the updated
files, follow the link below.

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