Description of problem: It seems Version-Release number of selected component (if applicable): 5.6.0.13 How reproducible: Fressh install of CF Steps to Reproduce: 1. Go to Cloud Intel -> Chargeback -> rates -> Compute 2. Click Configuration -> Add a new chargeback rate Actual results: You can't select any other option than "hourly" in the "per time" column. Expected results: You should be able to select at least "hourly" and "daily".
Created attachment 1209708 [details] Screenshot of the problem I added the attachment for a better understanding. It shows exactly in which menu you can't choose anything else than "hourly" in the dropdown.
Appliance Version: 5.6.2.2.20161017185613_7cee0a0 On the database i concluded that i am looking for the column "per_time" value source: vmdb_production=# select * from chargeback_rate_details; id | enabled | description | group | source | metric | per_time | per_unit | friendly_rate | chargeback_rate_id | created_on | updated_on | chargeback_rate_detail_measure_id | charg eback_rate_detail_currency_id ---------------+---------+------------------------+-----------+-----------+-----------------------------------+----------+----------- [...TRUNCATED...] (13 rows) Where are the values from "per_time" column from table "chargeback_rate_details" come from? File: /var/www/miq/vmdb/db/schema.yml chargeback_rate_details: - id - enabled - description - group - source - metric - per_time - per_unit - friendly_rate - chargeback_rate_id - created_on - updated_on - chargeback_rate_detail_measure_id - chargeback_rate_detail_currency_id Then i located the file "/var/www/miq/vmdb/app/controllers/chargeback_controller.rb" [root@cfme1 controllers]# grep per_time ./chargeback_controller.rb temp[:per_time] ||= "hourly" @edit[:new][:per_time_types] = {"hourly" => _("Hourly")} %i{per_time per_unit}.each do |measure| I since i am testing this on my very own POC setup, i took a chance... I assumed that there is code somewhere for at least a 'daily' rate... If there is no code for it, i hope the report will end up in a traceback... And changed: ORIGINAL : @edit[:new][:per_time_types] = {"hourly" => _("Hourly")} NEW : @edit[:new][:per_time_types] = {"hourly" => _("Hourly"), "daily" => _("Daily")} # grep -n ":per_time_types" /var/www/miq/vmdb/app/controllers/chargeback_controller.rb 596: @edit[:new][:per_time_types] = {"hourly" => _("Hourly"), "daily" => _("Daily")} Then i ran a chargeback report with a new chargeback rate using "Daily" and to my surprise, it did not result in a traceback. Hourly: (default/default:hourly) Date Range | VM Name Owner | CPU Used | CPU Total Cost | Memory Used | Memory Total Cost * Oct 2016 | cfme-prod_0004 | 0 MHz | $8.00 | 0 Bytes | $0.00 * *| Storage Used | Storage Total Cost | Storage Allocated | Storage Allocated Cost | 24 GB | $51,539,607,560.00 | 120 GB | $8.00 Daily: Date Range | VM Name Owner | CPU Used | CPU Total Cost | Memory Used | Memory Total Cost * Oct 2016 | cfme-prod_0004 | 0 MHz | $0.33 | 0 Bytes | $0.00 * *| Storage Used | Storage Total Cost | Storage Allocated | Storage Allocated Cost *| 24 GB | $2,147,483,648.33 | 120 GB | $0.33 Is it enough to manually modify the hardcoded auxiliary table? I do assume that there is code to support 'daily', otherwise the report would have failed with a traceback? I did not use the chargeback feature before. Is there any hope for it to be fixed for 5.6.x? Cheers.
This is dupe bz for this in master: https://bugzilla.redhat.com/show_bug.cgi?id=1401498
This was fixed in CFME 5.7.z (bug 1412283). This is gonna be fixed in CFME 5.8 (bug 1401498) In the first round this was not slated for 5.6.z. Please re-open if you need this in 5.6.z. Thanks! *** This bug has been marked as a duplicate of bug 1412283 ***
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days