Bug 1332686

Summary: Suspicious values in Chargeback for Containers
Product: Red Hat CloudForms Management Engine Reporter: Einat Pacifici <epacific>
Component: C&U Capacity and UtilizationAssignee: Ari Zellner <azellner>
Status: CLOSED CURRENTRELEASE QA Contact: Einat Pacifici <epacific>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: azellner, bazulay, cpelland, dron, epacific, fsimonce, gblomqui, gtanzill, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: container:c&u
Fixed In Version: 5.7.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1350906 (view as bug list) Environment:
Last Closed: 2017-01-11 20:27:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1350906    
Attachments:
Description Flags
Screenshot of report none

Description Einat Pacifici 2016-05-03 19:00:32 UTC
Created attachment 1153555 [details]
Screenshot of report

Description of problem:
The numbers dont quite add up. As far as i can tell "cpu used" should equal "cpu total".
Im looking into the problem but adding this issue for tracking.



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


How reproducible:


Steps to Reproduce:
1.Ensure pods are loaded and that CPU cores are used in project
2. Create chargeback report for project with loaded pods
3. Assign specific project sheetrate
4. Review chargeback report CPU cores details&values
Actual results:


Expected results:
report should reflect correct CPU core usage values

Additional info:
Report is showing wrong calculated cores values

This bug was opened upstream as well: 
https://github.com/ManageIQ/manageiq/issues/8250

Comment 3 Ari Zellner 2016-05-09 15:36:11 UTC
PR: https://github.com/ManageIQ/manageiq/pull/8547

Comment 4 Einat Pacifici 2016-05-10 09:41:28 UTC
Currently, I cannot reproduce this in my environment, due to an open bug: 
Bug 1333258 - CFME - Refresh Provider fails 

The fix is scheduled for next downstream CFME release. 
I will recreate this once the new release is available.

Comment 5 Ari Zellner 2016-05-10 10:26:27 UTC
Hopefully https://github.com/ManageIQ/manageiq/pull/8547 will be merged by then.

Comment 6 Ari Zellner 2016-05-17 10:22:59 UTC
https://github.com/ManageIQ/manageiq/pull/8547 Merged.
Moving to POST.

Comment 7 Einat Pacifici 2016-06-28 11:03:53 UTC
Values in chargeback reports are still unclear. Further calculation details are required from dev.

Comment 11 Einat Pacifici 2016-06-28 18:51:00 UTC
Please have a look at the attached screenshot: 
Keeping in mind that the default rate sheet was used. 
And that a full day metrics (24 hours) was accumulated.

Questions (relevant for all projects, but, I will concentrate my query to project=openshift-infra: 

1. If CPU Total = 760.292 Cores and CPU Used = 616.292 how is the CPU total cost = 6.51? 
2. If CPU Used = 616.292 how is CPU total Used cost = 4? 
3. If Memory total = 342.1 GB how is Memory total Cost = 64.62? 
4. If Memory Used = 75.7 GB How is Memory Used Cost = 64.62.
5. If Network I/O used = 9471 KBps, how is Network I/O used Cost = 70.16

Regarding the Total Cost (for Openshift-infra project) 
CPU Total Cost = 6.51
CPU Used Cost = 3.51
Memory Total Cost = 64.62
Memory Used Cost = 64.62
Network I/O Used Cost = 70.16

Adding all the above (6.51+3.51+64.62+64.62+70.16)= 209.42 
How Is the the Total Cost  = 141.30?

Comment 15 Federico Simoncelli 2016-07-12 16:58:23 UTC
Ari shouldn't this be in POST?

Comment 16 Ari Zellner 2016-07-12 17:10:19 UTC
Moving to Post