Bug 1379474

Summary: Incorrect storage used cost in Chargeback reports
Product: Red Hat CloudForms Management Engine Reporter: Nandini Chandra <nachandr>
Component: ReportingAssignee: Libor Pichler <lpichler>
Status: CLOSED CURRENTRELEASE QA Contact: Nandini Chandra <nachandr>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: cpelland, dajohnso, greartes, jhardy, jmarc, lpichler, ltsai, mfalesni, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: report:chargeback
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1397470 (view as bug list) Environment:
Last Closed: 2017-06-12 16:25:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1397470    
Attachments:
Description Flags
Storage Chargeback report for cu-24x7 none

Description Nandini Chandra 2016-09-26 22:06:05 UTC
Description of problem:
-----------------------
Inaccurate storage used costs are being reported in Chargeback reports.

Here's a table of the rates for Used CPU  USD/Hour/GB:
Range(start-finish)|Rate(fixed, variable)
--------------------------------
0.0 - Infinity       |0, 2.0

The 'Used Disk Storage' for one of my infra VMs(rhev) is 360 GB in a day.
It is actually 15 GB/hour for every hour on that day.
Going by this table,the rate is 2.0 USD/Hour/GB.The reported cost in the Chargeback report is $ $773,094,113,280.00.

Based on my calculation, the cost should be $720.

 Storage used cost = Used disk storage in GB/hour * storage rate per GB per hour
                   = 15 GB * $2.00 (/GB/hour) (for the 1st hour)+
                     15 GB * $2.00 (/GB/hour) (for the 2nd hour)+
                            ....
                            ....
                      15 GB * $2.00 (/GB/hour) (for the 24th hour)
                   = 720 $


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


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


Steps to Reproduce:
-------------------
1.Enable C&U collection for a provider.
2.Assign the Storage rate from the issue description to Enterprise
3.Generate a Chargeback report for VMs based on this rate.

Actual results:
---------------
Incorrect storage used cost in Chargeback reports


Expected results:
------------------
Correct storage used cost in Chargeback reports


Additional info:

Comment 2 Nandini Chandra 2016-09-26 22:08:36 UTC
I briefly discussed this issue with Libor today.Please let me know if you need access to my appliance.

Comment 3 Nandini Chandra 2016-09-26 22:10:36 UTC
Created attachment 1204989 [details]
Storage Chargeback report for cu-24x7

Comment 4 Nandini Chandra 2016-09-26 22:12:50 UTC
In the issue description, I'm referring to the 'cu-24x7' VM.

My chargeback cost calculation is based on its Storage used(360 GB) on 09/25/2016.

Comment 6 Nandini Chandra 2016-10-20 15:52:45 UTC
*** Bug 1387242 has been marked as a duplicate of this bug. ***

Comment 15 Nandini Chandra 2016-11-02 16:18:39 UTC
*** Bug 1379770 has been marked as a duplicate of this bug. ***

Comment 17 Satoe Imaishi 2016-11-16 19:39:05 UTC
Is this a duplicate of BZ #1346047 (BZ #1349413 is the 5.6.z clone)?

Comment 21 Nandini Chandra 2017-04-10 22:49:34 UTC
Verified in 5.8.0.9