Bug 1390773
Summary: | VM chargeback cost computed as if VM were used for 24 hours, even though it was used for < 24 hours | |||
---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Nandini Chandra <nachandr> | |
Component: | Reporting | Assignee: | Libor Pichler <lpichler> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Nandini Chandra <nachandr> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 5.7.0 | CC: | cpelland, dajohnso, jhardy, lpichler, obarenbo, simaishi, slukasik | |
Target Milestone: | GA | Keywords: | Reopened, TestOnly | |
Target Release: | 5.8.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | chargeback | |||
Fixed In Version: | 5.8.0.0 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1395312 1396665 (view as bug list) | Environment: | ||
Last Closed: | 2017-06-12 16:23:03 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: | 1395312, 1396665 |
Description
Nandini Chandra
2016-11-01 22:31:44 UTC
I spoke to John Hardy about this, he was in agreement that the behavior should not of changed to what it is today. Reopening and setting as a tentative blocker to 5.7 release. Nandini, Sergio and I looked at this and we think that the value should be calculated as follows: avg CPU mhz for the day * variable rate * 24 hours And, avg CPU mhz for the day = the sum of the hourly values / 24 This is the calculation we'd expect. Which is very close to yours. The difference would be due to rounding. (2685.44444444444 + 2674.81111111111 + 2675.01111111111) / 24 * 0.02 * 24 = 160.70533333333321 We can't see why the report would have 1285.64 USD. Would you be able to provide access to the appliance or at least the DB so that we can investigate? Merged to master: https://github.com/ManageIQ/manageiq/pull/12582 New commit detected on ManageIQ/manageiq/euwe: https://github.com/ManageIQ/manageiq/commit/f72936adb173609b4f1205dcf553c2c32d66d8aa commit f72936adb173609b4f1205dcf553c2c32d66d8aa Author: Gregg Tanzillo <gtanzill> AuthorDate: Mon Nov 14 16:27:23 2016 -0500 Commit: Oleg Barenboim <chessbyte> CommitDate: Tue Nov 15 09:59:51 2016 -0500 Merge pull request #12582 from lpichler/use_number_of_hours_in_interval_for_used_metrics Fix calculation of average for used metrics (cherry picked from commit 6e19aac6a06bc8d5712b8dd21dabfd2be70a79d4) https://bugzilla.redhat.com/show_bug.cgi?id=1390773 app/models/chargeback.rb | 2 +- app/models/chargeback_rate_detail.rb | 3 +- spec/models/chargeback_container_project_spec.rb | 44 ++++++++----- spec/models/chargeback_vm_spec.rb | 83 +++++++++++++++--------- 4 files changed, 83 insertions(+), 49 deletions(-) Verified in 5.8.0.8 |