Bug 1454456 - CPU allocated and CPU used shouldn't be summed up as CPU Total in Chargeback reports
Summary: CPU allocated and CPU used shouldn't be summed up as CPU Total in Chargeback ...
Keywords:
Status: CLOSED DUPLICATE of bug 1455690
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: GA
: 5.8.1
Assignee: Šimon Lukašík
QA Contact: Nandini Chandra
URL:
Whiteboard: chargeback
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-22 19:48 UTC by Nandini Chandra
Modified: 2023-09-14 03:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-06 08:11:17 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
chargeback report (16.28 KB, application/pdf)
2017-05-22 21:45 UTC, Nandini Chandra
no flags Details

Description Nandini Chandra 2017-05-22 19:48:09 UTC
Description of problem:
-----------------------
In general, the <metric> Total column in Chargeback reports is the sum of 
<metric> used and <metric> allocated.

But, it doesn't make sense to add the CPU Used and the vCPU allocated values.
In the attached report, vCPU allocated is 1 and CPU used is 20.29 MHz
for the nachandr-cback-58014001 VM on 05/16/2017.
CPU Total for this VM on the same day is 1+20.29 = 21.29MHz



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


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


Steps to Reproduce:
-------------------
1.Manage a provider.
2.Enable C&U collection for the provider.
3.Generate Chargeback report for a VM.


Actual results:
--------------
CPU allocated and CPU used values are summed up as CPU Total in Chargeback reports


Expected results:
----------------
CPU allocated and CPU used shouldn't be summed up as CPU Total in Chargeback reports


Additional info:
---------------

Comment 2 Nandini Chandra 2017-05-22 21:45:30 UTC
Created attachment 1281207 [details]
chargeback report

Comment 3 Šimon Lukašík 2017-05-26 08:19:11 UTC
FYI: Fully proper fix requires migration.

Comment 7 CFME Bot 2017-06-06 03:11:41 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/afb10c142b4aafd8136ef8e153e5704d2a15c888

commit afb10c142b4aafd8136ef8e153e5704d2a15c888
Author:     Šimon Lukašík <isimluk>
AuthorDate: Wed May 31 14:18:43 2017 +0200
Commit:     Šimon Lukašík <isimluk>
CommitDate: Wed May 31 15:12:58 2017 +0200

    Do not calculate useless group metrics
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1455690
    https://bugzilla.redhat.com/show_bug.cgi?id=1454456
    
     - cpu is useless as it counts usagemhz and vm_numvcpus together
     - cpu_cores is useless as it only reports cpu_cores
     - memory is useless as counts used and available together
     - net_io is useless as it only reports net_ui_rate_avg
     - disk_io is useless as it only reports disk_usage_rate_avg
     - storage is useless as it counts used and allocated together
     - fixed is useless as it counts all the fixed metrics together
       (that equals to 4 for each day, not useful)

 app/models/chargeable_field.rb    | 3 +--
 spec/models/chargeback_vm_spec.rb | 6 ------
 2 files changed, 1 insertion(+), 8 deletions(-)

Comment 8 CFME Bot 2017-06-06 03:26:48 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/22570acb78e1c72752b76d37c45b5f8e4369d6a2

commit 22570acb78e1c72752b76d37c45b5f8e4369d6a2
Author:     Šimon Lukašík <isimluk>
AuthorDate: Wed May 31 15:24:57 2017 +0200
Commit:     Šimon Lukašík <isimluk>
CommitDate: Wed May 31 15:24:57 2017 +0200

    Do not offer report columns that are useless
    
    See https://github.com/ManageIQ/manageiq/pull/15260 to learn why this is
    not useful.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1455690
    https://bugzilla.redhat.com/show_bug.cgi?id=1454456

 app/models/chargeback_vm.rb | 6 ------
 1 file changed, 6 deletions(-)

Comment 10 CFME Bot 2017-06-09 12:16:02 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/a5c8a79363ef3a470fe1315d6456011bcd47e9a1

commit a5c8a79363ef3a470fe1315d6456011bcd47e9a1
Author:     Šimon Lukašík <isimluk>
AuthorDate: Wed May 31 14:18:43 2017 +0200
Commit:     Šimon Lukašík <isimluk>
CommitDate: Thu Jun 8 10:34:42 2017 +0200

    Do not calculate useless group metrics
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1455690
    https://bugzilla.redhat.com/show_bug.cgi?id=1454456
    
     - cpu is useless as it counts usagemhz and vm_numvcpus together
     - cpu_cores is useless as it only reports cpu_cores
     - memory is useless as counts used and available together
     - net_io is useless as it only reports net_ui_rate_avg
     - disk_io is useless as it only reports disk_usage_rate_avg
     - storage is useless as it counts used and allocated together
     - fixed is useless as it counts all the fixed metrics together
       (that equals to 4 for each day, not useful)
    
    (cherry picked from commit afb10c142b4aafd8136ef8e153e5704d2a15c888)
    
    Conflicts:
    	app/models/chargeable_field.rb
    	spec/models/chargeback_vm_spec.rb

 app/models/chargeback_rate_detail.rb | 3 +--
 spec/models/chargeback_vm_spec.rb    | 6 ------
 2 files changed, 1 insertion(+), 8 deletions(-)

Comment 11 Red Hat Bugzilla 2023-09-14 03:57:57 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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