Bug 1358837 - ovirt web interface displays incorrect size for gluster volumes
Summary: ovirt web interface displays incorrect size for gluster volumes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Gluster
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Ramesh N
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-21 15:06 UTC by Rob Sanders
Modified: 2016-09-29 11:16 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-09-29 11:16:09 UTC
oVirt Team: Gluster
Embargoed:
sabose: ovirt-4.0.z?
rule-engine: planning_ack?
rule-engine: devel_ack+
sasundar: testing_ack+


Attachments (Terms of Use)
gluster volume (134.29 KB, image/png)
2016-07-21 15:09 UTC, Rob Sanders
no flags Details
storage ovewview (136.04 KB, image/png)
2016-07-21 15:10 UTC, Rob Sanders
no flags Details
Attaching the screenshot for volume capacity (138.96 KB, image/png)
2016-09-27 05:50 UTC, RamaKasturi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1269132 0 medium CLOSED [ALL_LANG] Unlocalized warning messages on volume->geo replication->add pane. 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1353289 0 high CLOSED Gluster: creating a brick display TiB instead GiB as size for block device 2021-02-22 00:41:40 UTC
oVirt gerrit 61749 0 master MERGED webadmin: fix @AlternateMessage annotation in UiMessages 2016-08-01 12:00:54 UTC
oVirt gerrit 61773 0 ovirt-engine-4.0 MERGED webadmin: fix @AlternateMessage annotation in UiMessages 2016-08-02 06:53:04 UTC
oVirt gerrit 62274 0 master MERGED gluster: fix enumtranslater issue in SizeConverter 2016-08-16 06:09:37 UTC
oVirt gerrit 62349 0 ovirt-engine-4.0 MERGED gluster: fix enumtranslater issue in SizeConverter 2016-08-16 12:05:04 UTC

Internal Links: 1269132 1353289

Description Rob Sanders 2016-07-21 15:06:33 UTC
I've got an ovirt 4.0 cluster configured with 3 nodes running replica 3 gluster volumes. When I navigate to "volumes" and select any of them, the "Capacity" in the "general" tab at the bottom row displays incorrect values. Rather than GiB, the values are reported in TiB:

Name:
VMs
Volume ID:
f9f570c1-cb08-4987-8988-94fc1f8862a0
Volume Type:
Replicate
Replica Count:
3
Number of Bricks:
3
Transport Types:
TCP
Maximum no of snapshots:
256
Capacity:
196.74 TiB total, 112.04 TiB used, 84.7 TiB free


once this gluster share is connected, the "storage" -> "general" tab displays the correct values:

Size:
196 GB
Available:
74 GB
Used:
122 GB
Allocated:
272 GB
Over Allocation Ratio:
221%
Warning Low Space Indicator:
10% (19 GB)
Critical Space Action Blocker:
5 GB

Comment 1 Rob Sanders 2016-07-21 15:09:36 UTC
Created attachment 1182554 [details]
gluster volume

Comment 2 Rob Sanders 2016-07-21 15:10:46 UTC
Created attachment 1182556 [details]
storage ovewview

Comment 3 Ramesh N 2016-07-28 09:48:35 UTC
This seems to be an issues with com.google.gwt.i18n.client.Messages.AlternateMessage.

We have defined some alternate messages using @Messages.Select with Enums for the SizeUnits. But its doesn't work any more.

We have following messages in the UIMessages.java.

    @Messages.AlternateMessage(value = { "BYTES" , "{0} B" , "KiB" , "{0} KiB" , "MiB" , "{0} MiB" , "GiB" , "{0} GiB" , "TiB" , "{0} TiB" })
    String sizeUnitString(String size, @Messages.Select
    SizeConverter.SizeUnit sizeUnit);

But the generated UIMessages_.java doesn't use any of the condition. 
  
  public java.lang.String sizeUnitString(java.lang.String arg0,org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit arg1) {
    java.lang.String returnVal = null;
    int arg1_ordinal = -1;
    if (arg1 != null) {
      arg1_ordinal = arg1.ordinal();
    }
    if (returnVal != null) {
      return returnVal;
    }
    return arg0 + " TiB";
  }

Comment 4 Ramesh N 2016-07-28 09:52:57 UTC
This issue is seen in many places like Create Brick Wizard, Volumes General Tab, Rebalance and Remove Brick status popups, etc. Everything is shown as "XXX TiB'.

Comment 5 RamaKasturi 2016-09-27 05:49:21 UTC
Verified and works fine with ovirt-engine-4.0.4.4-0.1.el7ev.noarch.

Volume capacity is displayed correctly with out any issues.

Comment 6 RamaKasturi 2016-09-27 05:50:02 UTC
Created attachment 1205056 [details]
Attaching the screenshot for volume capacity

Comment 7 Rob Sanders 2016-09-27 10:46:39 UTC
It's looking good. Thank you for fixing it!


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