Bug 1350906

Summary: Suspicious values in Chargeback for Containers
Product: Red Hat CloudForms Management Engine Reporter: John Prause <jprause>
Component: C&U Capacity and UtilizationAssignee: Ari Zellner <azellner>
Status: CLOSED ERRATA 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: ZStream
Target Release: 5.6.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: container:c&u
Fixed In Version: 5.6.1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1332686 Environment:
Last Closed: 2016-08-18 17:52:40 UTC Type: ---
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: 1332686    
Bug Blocks:    
Attachments:
Description Flags
screenshots of rate and report
none
Verified bug - rate + generated report none

Comment 1 Federico Simoncelli 2016-07-12 23:28:47 UTC
Ari shouldn't this be on POST?

Comment 3 Einat Pacifici 2016-07-28 08:40:11 UTC
Created attachment 1184952 [details]
screenshots of rate and report

Comment 4 Einat Pacifici 2016-07-28 08:41:04 UTC
Added Screenshots - Ari is currently investigating.

Comment 5 Ari Zellner 2016-07-28 09:03:00 UTC
I checked it out and the values make sense:
On that environment ran 2 pods under the project named default.
yesterday they each produced metrics for 13 hours.

the rate is $1 per hour so for 27/7/2016 the fixed rate would be $1 * 2pods * 13 = $26

Code used to test this:
irb(main):037:0> id=ContainerProject.find_by_name('default'); MetricRollup.where(:resource_id => ContainerGroup.where('container_project_id = ? or old_container_project_id = ?', id, id).select(:id), :resource_type => 'ContainerGroup').where('timestamp > \'2016-07-27 00:00:00\' and timestamp < \'2016-07-28 00:00:00\'').pluck(:timestamp,:resource_id).count
=> 26

Comment 6 Einat Pacifici 2016-08-01 08:55:39 UTC
Created attachment 1186300 [details]
Verified bug - rate + generated report

Bug verified. 
See final rate sheet and generated report.

Comment 8 errata-xmlrpc 2016-08-18 17:52:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-1634.html