Bug 1590394

Summary: chargeback reports based on vms with tags show incorrect values for cpus and memory fixed costs
Product: Red Hat CloudForms Management Engine Reporter: Felix Dewaleyne <fdewaley>
Component: ReportingAssignee: Libor Pichler <lpichler>
Status: CLOSED NOTABUG QA Contact: Nandini Chandra <nachandr>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, fdewaley, jprause, lpichler, nachandr, obarenbo
Target Milestone: GA   
Target Release: 5.9.4   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-19 14:02:42 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:
Attachments:
Description Flags
rate
none
report none

Description Felix Dewaleyne 2018-06-12 14:43:20 UTC
Description of problem:
chargeback reports based on vms with tags show incorrect values for cpus and memory fixed costs

Version-Release number of selected component (if applicable):
5.9.2.4-3 (hotfix previously released)

How reproducible:
all the time

Steps to Reproduce:
1. set up cloudforms environment with rhev & data collection & an associated tag used for a test vm
2. create a chargeback compute rate based on "additional info" details
3. assign the rates to a tag used 
4. generate a report

Actual results:
for cpu, the cost computed is 0
for memory, the cost is based on 1gb instead of 16.

Expected results:
for 4 vcpus the charge is 4 times the fixed cost per cpu
for memory the cost is computed correctly, per memory per month

Additional info:
the chargeback is based on default with the following costs set :
- allocated cpu cores : 1000 Eur / month / cpu core
- allocated memory : 10 Eur / month / GB

the vm used in tests had 4cpus and 16384 MB ram

Comment 4 Libor Pichler 2018-06-12 17:53:00 UTC
Created attachment 1450587 [details]
rate

Comment 5 Libor Pichler 2018-06-12 17:53:23 UTC
Created attachment 1450588 [details]
report