Description of problem: I have tried to get the chargeback report from a client in CloudForms 4.0, but i've received a large amount from memory used, storage used, disk i/o used and cpu used, but if you multiply the amount that the report gives by the rates assigned for that user, the result is not the same that i expected. If i've used 8 Ghz in 1 month and the rates for that is $1 USD for 1 month, i've expected that the cost for use is $8 USD, but the report gave me $0.01 USD. I have the same situation with memory used, disk i/0 used and storage allocated and storage used. I hope that the used item and the cost are right, if i've used 8 GHz in one month and the rates for that is $1 USD for 1 GHZ in month, the cost must give me $8 USD. Version-Release number of selected component (if applicable): CloudForms 4.0 How reproducible: nigh impossible Additional info: (pending)
Created attachment 1191602 [details] all reports together in one screenshot
Created attachment 1192153 [details] chargeback analysis
*** Bug 1372838 has been marked as a duplicate of this bug. ***
New commit detected on ManageIQ/manageiq/euwe: https://github.com/ManageIQ/manageiq/commit/d1b8be27e9d2208967d52fdb2bcc2326fd0c53a6 commit d1b8be27e9d2208967d52fdb2bcc2326fd0c53a6 Author: Gregg Tanzillo <gtanzill> AuthorDate: Wed Oct 19 17:37:49 2016 -0400 Commit: Oleg Barenboim <chessbyte> CommitDate: Fri Oct 21 11:26:05 2016 -0400 Merge pull request #11648 from lpichler/new_chargeback_calculations New chargeback calculations (cherry picked from commit 63996cc5ca543e61d4083af7554701ee21082130) https://bugzilla.redhat.com/show_bug.cgi?id=1346047 app/models/chargeback.rb | 109 +++++++---- app/models/chargeback_rate_detail.rb | 47 ++++- spec/models/chargeback_container_image_spec.rb | 9 +- spec/models/chargeback_container_project_spec.rb | 56 ++++-- spec/models/chargeback_rate_detail_spec.rb | 18 +- spec/models/chargeback_vm_spec.rb | 233 +++++++++++++++++------ 6 files changed, 352 insertions(+), 120 deletions(-)
https://github.com/ManageIQ/manageiq/pull/12119
Created attachment 1213488 [details] evm after hotfix
Feedback from the customer after the hotfix "I have made that you request me, but i can't request a chargeback report, i get an error in the GUI (red icon) and i can't select nothing in the chargeback option like rates or assigments, even if i try to make another chargeback report, the option are empty. ¿Should i need do another thing?" I have attached the screenshot of the ui error and the evm log.
https://github.com/ManageIQ/manageiq/pull/12728
Created attachment 1231178 [details] charegeback fixes
4. For formatting to 2 decimals in CPU used is used formatter called 'Megahertz Avg (12.11 Mhz)' in tab format.(for others is used <None>) So please check whether is used this formatter for CPU used. See attachment where to set it up.(Reason is that this formatter is used as default formatter for CPU Used when new report is added.) >>I want to know something: 1. Yes I believe that it is the reason. Because for allocated metrics (storage allocated) is used maximum of the values on the report interval but for used metrics (CPU Used) is used average of values on the report interval. So when VM was shutdown then it certainly affects the used values(for example - storage used). 2. I think that yes, what differences do you mean ? I checked calculations on the reports and they are looks good to me. Some example from your hourly report: on the report: metric 'storage allocated' in Oct Rate for storage allocated is 0.001 hourly (USD/Hour/GB) Storage allocated: 40 GB Storage allocated cost: 0.001 (hourly rate) * 40 GB (Storage allocated) * 744 (count of hours in October) = $29.76 (as it is on report)
I think this particular bz should be now in POST.
There have been many prs due to this bz. We run into problem that multiple unrelated problems and rfes were handled through this single bz. Most of the stuff has been fixed before euwe was branched. Some will be fixed with bring back to euwe with https://github.com/ManageIQ/manageiq/pull/13419 We discussed that with Libor, we think that there are two prs that remain to be backported with this to euwe. 1) Rounding of report to two decimals - https://github.com/ManageIQ/manageiq/pull/12629 2) selecting single rate when multiple rates apply - https://github.com/ManageIQ/manageiq/pull/12534
Again, discussed with Libor. It seems the best thing to do would be to create a new separate pr for darga to bring this. During the hotfixes, Libor already did the heavy lifting of rebasing prs from master to darga. It does not make sense to do it again. We should just put these hotfixes to the new pr for darga. What timeframe are we looking into?
Verified in 5.8.0.4