Bug 1257797

Summary: Memory amount in Clusters Capacity report is rounded down
Product: [Retired] ovirt-engine-reports Reporter: Karolína Hajná <khajna>
Component: GeneralAssignee: Shirly Radco <sradco>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: low Docs Contact:
Priority: high    
Version: ---CC: bugs, gklein, khajna, lsurette, lsvaty, pmatyas, pstehlik, rbalakri, sradco, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.3Flags: rule-engine: ovirt-3.6.z+
rule-engine: exception+
ylavi: planning_ack+
rule-engine: devel_ack+
pnovotny: testing_ack+
Target Release: 3.6.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1257798 (view as bug list) Environment:
Last Closed: 2016-02-18 11:20:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Reports RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot none

Description Karolína Hajná 2015-08-28 05:49:06 UTC
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):
3.6.0-0.0.master.20150819133528.gite6b79a7.el6

How reproducible:
100%

Actual results:
Chaotic data in report

Expected results:
Correct data in report

Comment 3 Red Hat Bugzilla Rules Engine 2015-10-19 11:01:15 UTC
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 12:31:39 UTC
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 11:36:15 UTC
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 12:39:08 UTC
Lukas, can you provided the needed information? It's been on NEEDINFO for a week now.
Thanks,
Y.

Comment 7 Lukas Svaty 2016-01-19 09:42:27 UTC
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 13:22:15 UTC
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 14:29:54 UTC
Created attachment 1116663 [details]
screenshot

Comment 13 Lukas Svaty 2016-01-20 14:30:12 UTC
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 09:33:19 UTC
(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 09:47:23 UTC
Yes. Working on the fix now.

Comment 16 Lukas Svaty 2016-02-04 12:18:10 UTC
verified in rhevm-reports-3.6.3-1.el6ev.noarch