Rating and Reporting option not working

Bug #1527048 reported by muralidharan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloudkitty
Invalid
Undecided
Unassigned

Bug Description

Hello

I am using Devstack Liberty version.

For the same I have tried using the Cloudkitty with it.

I can be able to see that CLoudkitty pricing seems to be working in case of creation moment.

For Ex: I can be able to see that Price is getting displayed correctly during the instance creation. When I am applying the size , image etc.,

It is displaying the values correspondingly as I configured.

But after the creation of an instance, I am unable to see the values in rating and reporting section.

I have checked the Db for the same.

*************************** 383. row ***************************
       id: 383
    begin: 2015-12-16 22:00:00
      end: 2015-12-16 23:00:00
     unit: None
      qty: 0
 res_type: _NO_DATA_
     rate: 0
     desc: ""
tenant_id: e6a7488a2ca34ee4b41bbaaafbfadd71
*************************** 384. row ***************************
       id: 384
    begin: 2015-12-16 23:00:00
      end: 2015-12-17 00:00:00
     unit: None
      qty: 0
 res_type: _NO_DATA_
     rate: 0
     desc: ""
tenant_id: e6a7488a2ca34ee4b41bbaaafbfadd71
*************************** 385. row ***************************
       id: 385
    begin: 2015-12-17 00:00:00
      end: 2015-12-17 01:00:00
     unit: None
      qty: 0
 res_type: _NO_DATA_
     rate: 0
     desc: ""
tenant_id: e6a7488a2ca34ee4b41bbaaafbfadd71
*************************** 386. row ***************************
       id: 386
    begin: 2015-12-17 01:00:00
      end: 2015-12-17 02:00:00
     unit: None
      qty: 0
 res_type: _NO_DATA_
     rate: 0
     desc: ""
tenant_id: e6a7488a2ca34ee4b41bbaaafbfadd71

It is simply displaying the values as above.

I can see that ceilometer is collecting the details correctly.

<pre>
root@devstack:/opt/devstack# ceilometer statistics --meter instance -q 'resource_id=aa0ee962-6860-4558-83f4-fd62ee7460cb'
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
| Period | Period Start | Period End | Max | Min | Avg | Sum | Count | Duration | Duration Start | Duration End |
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
| 0 | 2015-12-18T08:45:25.838288 | 2015-12-18T09:25:25.355650 | 1.0 | 1.0 | 1.0 | 5.0 | 5 | 2399.517362 | 2015-12-18T08:45:25.838288 | 2015-12-18T09:25:25.355650 |
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+

</pre>

All quantity fields were simply displayed as 0.

Please check and fix this.

Revision history for this message
muralidharan (muraliselva-10) wrote :

Db dump and local.conf file

Revision history for this message
Aaron DH (aaron.d) wrote :

Hi Murali,
Maybe you can exec `ceilometer statistics -m compute -g resource_id` to find that wether ceilometer has collected the compute service data.

Revision history for this message
muralidharan (muraliselva-10) wrote :

I can see that ceilometer is collecting the results.

root@devstack:/opt/devstack# ceilometer statistics --meter instance -q 'resource_id=aa0ee962-6860-4558-83f4-fd62ee7460cb'
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
| Period | Period Start | Period End | Max | Min | Avg | Sum | Count | Duration | Duration Start | Duration End |
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+
| 0 | 2015-12-18T08:45:25.838288 | 2015-12-18T09:25:25.355650 | 1.0 | 1.0 | 1.0 | 5.0 | 5 | 2399.517362 | 2015-12-18T08:45:25.838288 | 2015-12-18T09:25:25.355650 |
+--------+----------------------------+----------------------------+-----+-----+-----+-----+-------+-------------+----------------------------+----------------------------+

description: updated
Revision history for this message
muralidharan (muraliselva-10) wrote :

One more thing I have noticed here.

After some hours from the instance creation.Details were getting added in DB.

Then value is getting displayed in fornt end.

HOw to fix this timing issue.

select * from rated_data_frames \G;

*************************** 417. row ***************************
       id: 417
    begin: 2015-12-18 08:00:00
      end: 2015-12-18 09:00:00
     unit: instance
      qty: 1
 res_type: compute
     rate: 9
     desc: {"user_id": "e2c0c279e00647348b665d4c1cd60a81", "name": "sd", "availability_zone": "nova", "instance_id": "271d9a80-ec1e-4506-9639-9e3b1a5326b2", "image_id": "fbc9ca36-215f-47ed-b970-ef32e0658634", "vcpus": "1", "memory": "512", "flavor": "m1.tiny", "project_id": "4e4eba14f634470f80d49ba84afdddf4", "metadata": {}}
tenant_id: 4e4eba14f634470f80d49ba84afdddf4
*************************** 418. row ***************************
       id: 418
    begin: 2015-12-18 08:00:00
      end: 2015-12-18 09:00:00
     unit: instance
      qty: 1
 res_type: compute
     rate: 9
     desc: {"user_id": "fb6a392276d74cd5a7ff438619ecd5bc", "name": "sytr", "availability_zone": "nova", "instance_id": "aa0ee962-6860-4558-83f4-fd62ee7460cb", "image_id": "fbc9ca36-215f-47ed-b970-ef32e0658634", "vcpus": "1", "memory": "512", "flavor": "m1.tiny", "project_id": "4e4eba14f634470f80d49ba84afdddf4", "metadata": {}}
tenant_id: 4e4eba14f634470f80d49ba84afdddf4
418 rows in set (0.00 sec)

Revision history for this message
Aaron DH (aaron.d) wrote :

Now Cloudkitty can not support calculate the price and get the result immediately.

it has a rating period in cloudkitty.conf (defualt is 3600)

that means data collected and rated once every hour.

Revision history for this message
Jeremy Liu (liujiong) wrote :

seems like you have found the reason.

Changed in cloudkitty:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.