Bug 1257797 - Memory amount in Clusters Capacity report is rounded down
Memory amount in Clusters Capacity report is rounded down
Product: ovirt-engine-reports
Classification: oVirt
Component: General (Show other bugs)
Unspecified Unspecified
high Severity low (vote)
: ovirt-3.6.3
: 3.6.3
Assigned To: Shirly Radco
Lukas Svaty
Depends On:
  Show dependency treegraph
Reported: 2015-08-28 01:49 EDT by Karolína Hajná
Modified: 2016-02-18 06:20 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1257798 (view as bug list)
Last Closed: 2016-02-18 06:20:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Reports
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.z+
rule-engine: exception+
ylavi: planning_ack+
rule-engine: devel_ack+
pnovotny: testing_ack+

Attachments (Terms of Use)
screenshot (23.10 KB, image/png)
2016-01-20 09:29 EST, Petr Matyáš
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 52691 master MERGED reports: fixed bug in br48 capacity planning 2016-01-26 05:17 EST

  None (edit)
Description Karolína Hajná 2015-08-28 01:49:06 EDT
Description of problem:
Behaviour of this report is quite unpredictable. I added 1 - 3 hosts to my engine. Each has 4 CPU cores and 4 678 MB of RAM. After adding first host the report showed that the host has 0 CPUs and 0 RAM. I tried to refresh and relog few times, still the same result. Then the values changed suddenly to 16 CPUs (while the host has 4) and 4 GB of RAM. I would understand that it takes some time to load the new data but in that case there shouldn't be even the correct number of hosts. Adding the other two hosts confirmed 16 CPUs per host. RAM value is correct but it might be better to have one decimal digit shown as well since the value is chopped off to whole GBs. 

When I added two VMs, one running and one turned of, disk section was showing correct data while other sections were not showing any VMs at all. Data in these sections showed after adding a host to new cluster (but still incorrect in some cases). Also there were no VMs on the new host but when I used "Display by cluster" option, it showed number of VMs data from the first cluster.

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

How reproducible:

Actual results:
Chaotic data in report

Expected results:
Correct data in report
Comment 3 Red Hat Bugzilla Rules Engine 2015-10-19 07:01:15 EDT
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Comment 4 Yaniv Lavi 2015-10-29 08:31:39 EDT
In oVirt testing is done on single release by default. Therefore I'm removing the 4.0 flag. If you think this bug must be tested in 4.0 as well, please re-add the flag. Please note we might not have testing resources to handle the 4.0 clone.
Comment 5 Shirly Radco 2016-01-12 06:36:15 EST
The data is taken from configuration tables that are updated each minute
and from hourly statistics tables that are updated hourly for the hour before last.
So, In order to view the the changes you made you will need to wait 2 hours.

How long did you wait until you checked the report?

If the data still not working as expected please attach screenshuts and history db dump.
Comment 6 Yaniv Kaul 2016-01-18 07:39:08 EST
Lukas, can you provided the needed information? It's been on NEEDINFO for a week now.
Comment 7 Lukas Svaty 2016-01-19 04:42:27 EST
The problem that appeared, might be cause by too recent report as history tables were not updated yet as Shirly suggested. On my scenarios with older database. Few basic cases were ok. However I want to do more detailed tests on this today and will update with the result (either CLOSE this or add additional data).
Comment 8 Lukas Svaty 2016-01-19 08:22:15 EST
Tested this, with 2 hosts, 1 nfs, 2 VMs (1 up, 1 down). After 3 hours. Cluster capacity is not displaying any VMs. Thus, I have to believe the hourly aggregation is not enough to collect and display necessary data. Can these information be taken from daily tables, Shirly?

I would imagine these information should be collected immediately so admin should not wait for next aggregation, but rather see the report of current system so he can plan the capacity of cluster/DC. If older data should be aggregated some time interval is necessary within input values.
Comment 12 Petr Matyáš 2016-01-20 09:29 EST
Created attachment 1116663 [details]
Comment 13 Lukas Svaty 2016-01-20 09:30:12 EST
Found out my database is not working as expected. Peter will provide his report with data (thanks). Only thing that seems to be misleading in the database is reported Memory of VMs (1GB missing). Once this is fixed this can be moved to VERIFIED and unblock the feature.
Comment 14 Lukas Svaty 2016-01-25 04:33:19 EST
(In reply to Lukas Svaty from comment #13)
> Found out my database is not working as expected. Peter will provide his
> report with data (thanks). Only thing that seems to be misleading in the
> database is reported Memory of VMs (1GB missing). Once this is fixed this
> can be moved to VERIFIED and unblock the feature.

Please see screenshot added by pmatyas in Comment#12. 6 VMS 1GB each reporting only sum of 5GB and 2 VMS running 1GB each reporting only sum of 1GB. Can this be cause by rounding issue?
Comment 15 Shirly Radco 2016-01-25 04:47:23 EST
Yes. Working on the fix now.
Comment 16 Lukas Svaty 2016-02-04 07:18:10 EST
verified in rhevm-reports-3.6.3-1.el6ev.noarch

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