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:
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.
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.
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
Assigning to Suyog for review. Suyog - just a quick update required for this one.