Bug 1371195 - Calculation of average storage domains is wrong for dashboards
Summary: Calculation of average storage domains is wrong for dashboards
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.0.2.7
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ovirt-4.0.4
: 4.0.4.2
Assignee: Shirly Radco
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-29 14:27 UTC by Shirly Radco
Modified: 2016-09-26 12:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:34:53 UTC
oVirt Team: UX
Embargoed:
rule-engine: ovirt-4.0.z+
ykaul: planning_ack+
oourfali: devel_ack+
ykaul: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 63148 0 master MERGED fix storage domains dashboard queries 2016-09-06 20:36:44 UTC
oVirt gerrit 63455 0 ovirt-engine-4.0 MERGED fix storage domains dashboard queries 2016-09-06 20:58:51 UTC
oVirt gerrit 63457 0 ovirt-engine-4.0.4 MERGED fix storage domains dashboard queries 2016-09-06 21:00:44 UTC

Description Shirly Radco 2016-08-29 14:27:20 UTC
Description of problem:
The calculation of average storage domains is wrong


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

How reproducible:
100%

Steps to Reproduce:
1. Install engine
2. Check the storage domain available,used and total size vs. the data in the dashboards.

Actual results:
Data is incorrect

Expected results:
Data should be calculated currectly

Additional info:

Comment 2 Pavel Novotny 2016-09-08 17:13:10 UTC
Can you please describe more what are the steps for verification here?
Also see my questions below.

(In reply to Shirly Radco from comment #0)
[snip]
> Steps to Reproduce:
> 1. Install engine
> 2. Check the storage domain available,used and total size vs. the data in
> the dashboards.

Does the wrong avg. value show immediately after adding new storage
or does it show after some time, e.g., after few minutes, hours?

> 
> Actual results:
> Data is incorrect

Incorrect how? Higher, lower, double, zero ... than it should be?
Thanks.

Comment 3 Shirly Radco 2016-09-11 05:53:50 UTC
(In reply to Pavel Novotny from comment #2)
> Can you please describe more what are the steps for verification here?
> Also see my questions below.
> 
> (In reply to Shirly Radco from comment #0)
> [snip]
> > Steps to Reproduce:
> > 1. Install engine
> > 2. Check the storage domain available,used and total size vs. the data in
> > the dashboards.
> 
> Does the wrong avg. value show immediately after adding new storage
> or does it show after some time, e.g., after few minutes, hours?
> 
> > 
> > Actual results:
> > Data is incorrect
> 
> Incorrect how? Higher, lower, double, zero ... than it should be?
> Thanks.

Previously the calculation was
usage percentage = used_disk_size_gb AS float / available_disk_size_gb

It should be 
usage percentage = (used_disk_size_gb AS float) / (used_disk_size_gb + available_disk_size_gb)

Comment 4 Pavel Novotny 2016-09-14 15:26:37 UTC
Verified in rhevm-4.0.4.2-0.1.el7ev.noarch

Verification steps: 
1. Install ovirt-engine.
2. Add 2 storages (each one has: Size: 767 GB, Available: 230 GB, Used: 537 GB)
3. Check the usage percentage reported in Dashboard - Storage Utilization 
   and compare it with computed result.

Result:

Usage formula:
> usage percentage = (used_disk_size_gb AS float) / (used_disk_size_gb + vailable_disk_size_gb)
I. e.:
537*2 / ( 537*2 + 230*2) = 0,700130378 -> 70%

Dashboard shows: 70% TiB Used
It matches the computed result.


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