Bug 1413110 - Discrepancy in resource usage reported between daily, weekly, monthly Chargebcack reports
Summary: Discrepancy in resource usage reported between daily, weekly, monthly Chargeb...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.8.0
Assignee: Šimon Lukašík
QA Contact: Nandini Chandra
URL:
Whiteboard: chargeback
Depends On:
Blocks: 1418846 1425916
TreeView+ depends on / blocked
 
Reported: 2017-01-13 16:34 UTC by Nandini Chandra
Modified: 2017-10-10 18:36 UTC (History)
4 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1418846 1425916 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:44:23 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)
Daily Chargeback report (31.09 KB, application/pdf)
2017-01-13 16:38 UTC, Nandini Chandra
no flags Details
Weekly Chargeback report (27.74 KB, application/pdf)
2017-01-13 16:38 UTC, Nandini Chandra
no flags Details
Monthly Chargeback report (27.45 KB, application/pdf)
2017-01-13 16:39 UTC, Nandini Chandra
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1402072 0 high CLOSED Discrepancy in costs reported between daily and monthly Chargeback reports 2021-02-22 00:41:40 UTC

Internal Links: 1402072

Description Nandini Chandra 2017-01-13 16:34:38 UTC
Description of problem:
-----------------------
I have generated daily, weekly and monthly Chargeback reports on Dec 11 at midnight UTC.

period = 12/07 - 12/10

The resource usage is different in all the 3 reports.

For eg, in the cb-owner-daily - Sun, 11 Dec 2016 00:00:14 +0000 report,I summed up the CPU used for the cu-24x7 VM for 12/07 - 12/10.

Total CPU used = (4.17 + 47.52 + 58.37 + 53.17)MHz
               = 163.23 MH

The weekly report shows that the CPU used is 23.65 MHz for the same period.
The monthly report shows that CPU used is 5.27 MHz for the same period.        

I have attached all the three reports.

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


How reproducible:
-----------------
Always


Steps to Reproduce:
-------------------
1.Manage a provider. Collect C&U data for a few days(4 days in the attached report).
2.Generate daily Chargeback report with this option :
   In the filter tab, in the Chargeback interval section,select 'Day' in the 
   'Show costs by' option in the Chargeback Interval section.
 Generate weekly Chargeback report with this option :
   In the filter tab, in the Chargeback interval section,select 'Week' in the 
   'Show costs by' option Chargeback Interval section.
 Generate monthly Chargeback report with this option :
   In the filter tab, in the Chargeback interval section,select 'Month' in the 
   'Show costs by' option in the Chargeback Interval section.
3.Compare the resource usage reported in the three reports.


Actual results:
---------------
The resource usage in the weekly and monthly reports are incorrect.


Expected results:
-----------------
The resource usage in the weekly and monthly reports should be the same as the resource usage reported in the daily report.


Additional info:
----------------

Comment 2 Nandini Chandra 2017-01-13 16:38:17 UTC
Created attachment 1240409 [details]
Daily Chargeback report

Comment 3 Nandini Chandra 2017-01-13 16:38:43 UTC
Created attachment 1240411 [details]
Weekly Chargeback report

Comment 4 Nandini Chandra 2017-01-13 16:39:17 UTC
Created attachment 1240412 [details]
Monthly Chargeback report

Comment 5 Šimon Lukašík 2017-01-18 09:48:11 UTC
Hello Nandini,

This is very nice find.

I noticed this also when working on bug 1402072. It should be fixed together with bug 1402072.


The problem was:
---------------
We took consumption from metric rollups as A.
We took number of hours in interval (day = 24, week=24*7, month ~~ 24*30) as B.

Then we calculated average as = A/B. The problem was that we cannot use B as it is. We need to use only past hours in given interval.


More Issue like this:
---------------
Imagine you create VM in the middle of month. Then consumption average should be again calculated based on real consumed hours. Not hours in month.

Imagine you retire VM in the middle of month. Then consumption average should be again calculated based on real consumed hours. Not hours in month.

That's all fixed in bug 1402072.

Thanks!

Comment 7 Nandini Chandra 2017-02-06 22:39:22 UTC
Verified in 5.7.1

Comment 8 Nandini Chandra 2017-02-07 19:24:43 UTC
I meant to verify the 5.7.1 clone and not this.

Moving this back to ON_QA.

Comment 9 Nandini Chandra 2017-02-16 19:48:10 UTC
This issue affects 5.6.4 as well.Can this be cloned to 5.6?

Comment 10 Šimon Lukašík 2017-02-22 09:30:05 UTC
I think the answer is yes. This can be cloned. You can use clone button to make the clone for 5.6.

Then, the 3 ack process will be used to decide whether that bug is worth including into the 5.6.

I have no visibility into how many releases are planned for 5.6.z. and I am not sure if there are any written policies for backporting to 5.6. Thus, it is still possible that the clone will never be fixed. However, it is worth filing, as it gives us visibility into what is broken in what versions.

Thanks!

Comment 13 Nandini Chandra 2017-04-13 21:40:41 UTC
Verified in 5.8.0.10


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