Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1358837

Summary: ovirt web interface displays incorrect size for gluster volumes
Product: [oVirt] ovirt-engine Reporter: Rob Sanders <rob>
Component: BLL.GlusterAssignee: Ramesh N <rnachimu>
Status: CLOSED CURRENTRELEASE QA Contact: RamaKasturi <knarra>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.0CC: bugs, sabose, sasundar
Target Milestone: ovirt-4.0.4Flags: sabose: ovirt-4.0.z?
rule-engine: planning_ack?
rule-engine: devel_ack+
sasundar: testing_ack+
Target Release: 4.0.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-29 11:16:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
gluster volume
none
storage ovewview
none
Attaching the screenshot for volume capacity none

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!