Bug 1526030 - Chargeback report shows incorrect CPU Total Cost and Memory Total Cost if allocated and used costs aren't also displayed
Summary: Chargeback report shows incorrect CPU Total Cost and Memory Total Cost if all...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Documentation
Version: 5.9.0
Hardware: All
OS: All
medium
medium
Target Milestone: GA
: 5.9.0
Assignee: Suyog Sainkar
QA Contact: Dayle Parker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-14 16:24 UTC by Tasos Papaioannou
Modified: 2018-06-15 05:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-15 05:59:35 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1567254 0 medium CLOSED total costs no longer showing in any chargeback report if they are the only columns in the report 2021-09-09 13:42:21 UTC

Internal Links: 1567254

Description Tasos Papaioannou 2017-12-14 16:24:09 UTC
Description of problem:




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

5.9.0.13

How reproducible:

100%

Steps to Reproduce:
1.) Enable C&U and add an infrastructure provider.
2.) Assign the Default compute chargeback rate to the enterprise. 
3.) Create a chargeback report that displays the CPU Total Cost and Memory Total Cost.
4.) Run the report, and see that the results show 0 for the CPU Total Cost and Memory Total Cost.
5.) Edit the report and add CPU Used Cost and Memory Used Cost fields, then re-run the report.
6.) See that the report shows the correct used costs based on daily metrics, but that the total costs are equal to the used costs and do not include the expected allocated costs.
7.) Edit the report again and add the vCPUs Allocated Cost and Memory Allocated Cost, Memory Used Cost, then re-run the report.
8.) See that the report now shows the correct total costs, in addition to the correct used and allocated costs.

Actual results:

Incorrect total costs for memory and CPU in chargeback report, unless both the allocated and used cost fields are also displayed in the report.

Expected results:

The total costs displayed in a chargeback report should not change based on which other fields are also displayed.

Additional info:

Comment 2 Gregg Tanzillo 2017-12-15 15:26:02 UTC
This is working as expected. Total costs are calculated by adding the calculated cost for the amount used and the calculated cost for the amount allocated. In the case where no used or allocated costs are added to the report, those costs would not be calculated and the total cost would be reported as 0.

Comment 3 Tasos Papaioannou 2017-12-15 15:56:26 UTC
That seems to contradict the claim in https://bugzilla.redhat.com/show_bug.cgi?id=1409539#c3 :

"This work as expected, the selection of column to display does not affect the calculation. We should document this."

That BZ added a note to the production documentation, in https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.5/html/monitoring_alerts_and_reporting/sect_chargeback#to_create_a_chargeback_report :

"When creating a chargeback report please note that the Total Cost is the complete cost for the chosen workload over the selected time frame. This sum is based on all fields assigned to the chargeback rate. When adding cost related columns to display on your report, please be sure to select all rate assigned fields to present a comprehensive accounting of total costs."

I don't understand why the choice of columns to display in a report should be expected to change the values displayed. The Memory Total Cost displayed in the report should be determined by the associated chargeback rate record, regardless of whether I decide to display the Memory Allocated Cost and Memory Used Cost as well.

Comment 4 Sudhir Mallamprabhakara 2018-01-05 03:39:42 UTC
Tasos,

After discussing with the product team, Product Management thinks that this is working as designed and the docs need to be updated if they say otherwise.

Converting this to the doc bug.

@Doc Team - Please update the documentation (sections listed in https://bugzilla.redhat.com/show_bug.cgi?id=1526030#c3) to reflect https://bugzilla.redhat.com/show_bug.cgi?id=1526030#c2 

Please reach out to Gregg Tanzillo for further questions.

- Sudhir

Comment 5 Andrew Dahms 2018-01-08 05:12:16 UTC
Assigning to Suyog for review.

Suyog - just a quick update required for this one.


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