Bug 2091946 - Add disk modal shows wrong units
Summary: Add disk modal shows wrong units
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Ugo Palatucci
QA Contact: Leon Kladnitsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-31 11:36 UTC by Leon Kladnitsky
Modified: 2023-11-13 08:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-14 19:35:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Units (38.07 KB, image/png)
2022-05-31 11:36 UTC, Leon Kladnitsky
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 558 0 None open Bug 2091946: replace Gi with GiB 2022-06-07 08:27:03 UTC
Red Hat Issue Tracker CNV-18733 0 None None None 2023-11-13 08:14:05 UTC
Red Hat Product Errata RHSA-2022:6526 0 None None None 2022-09-14 19:35:18 UTC

Description Leon Kladnitsky 2022-05-31 11:36:09 UTC
Created attachment 1885491 [details]
Units

Description of problem: Mi/Gi/Ti is shown instead of MiB/GiB/TiB


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


How reproducible: always


Steps to Reproduce:
1. Open or create VM
2. Open Disks tab and click "Add Disk" button
3.

Actual results: units dropdown shows Mi/Gi/Ti


Expected results: MiB/GiB/TiB


Additional info: the value in div is wrong, so the typo is probably in BE

Comment 1 Aviv Turgeman 2022-05-31 13:33:37 UTC
Hi Leon

Thank you for this bug,
since in the YAML file itself we insert the units with the 'B' at the end (Mi,Gi,Ti) we should consult with PM if this makes sense that the user will see MiB, GiB and TiB while the string in the YAML will stay as required by the backend (Mi, Gi, Ti)

adding @rsdeor to discussion

Comment 2 Ronen 2022-05-31 13:44:35 UTC
Aviv,

Storage unit are either MB/GB/TB or MiB/GiB/TiB and this is used throughout the industry and we should use those units.
We should ask storage why they are using non standard units names

Comment 3 Ugo Palatucci 2022-06-01 14:41:28 UTC
From what we have now, I can see a mixed approach among the console sections.
In k8s there is no mention of MiB/GiB/TiB quantity but only Mi/Gi/Ti (International System standard): https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/

Comment 4 Ronen 2022-06-02 06:00:50 UTC
Ugo, 
You are correct that the quantity should use Mi/Gi/Ti (mebi, gibi, tebi), but to this you need to add the unit you are using (Byte, in storage case)), so this becomes MiB/GiB/TiB.
You can see it in the "Examples and comparisons with SI prefixes" table in the same link (https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/)

Comment 5 Ugo Palatucci 2022-06-06 12:46:40 UTC
Okay right.

To be consistent among all the virtualization section pages/modals we should fix the units in:
- Disk Modal
- Disk List in wizard / Disk List in virtual machine / Disk list in virtual machine instance
- Customize Form
- Edit Boot Source Modal

These items have some logic in common so one fix can solve this issue in multiple items.

Should we create a different bug to solve all of them or is it acceptable to use this bug?

Comment 6 Guohua Ouyang 2022-06-09 02:17:48 UTC
great work, verified on OCP-v4.11.0-47

Comment 9 errata-xmlrpc 2022-09-14 19:35:07 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 (Important: OpenShift Virtualization 4.11.0 Images security and 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.

https://access.redhat.com/errata/RHSA-2022:6526


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