duplicated volume samples.

Bug #1261386 reported by Vadim Rovachev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Invalid
Undecided
Unassigned

Bug Description

When creating a volume, ceilometer adds to database duplicated samples for notifications: volume, volume.size
By example:
ubuntu@gate-devstack:~$ ceilometer sample-list -m volume.size
+-------------+------+------+--------+------+-----------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+-------------+------+------+--------+------+-----------+
+-------------+------+------+--------+------+-----------+
ubuntu@gate-devstack:~$ ceilometer sample-list -m volume
+-------------+------+------+--------+------+-----------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+-------------+------+------+--------+------+-----------+
+-------------+------+------+--------+------+-----------+
ubuntu@gate-devstack:~$ nova volume-create 1
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2013-12-16T12:22:14.519283 |
| display_description | None |
| display_name | None |
| id | 4476c077-11ac-4bed-b9df-d708497f8390 |
| metadata | {} |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+
ubuntu@gate-devstack:~$ ceilometer sample-list -m volume.size
+--------------------------------------+-------------+-------+--------+------+----------------------------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+--------------------------------------+-------------+-------+--------+------+----------------------------+
| 4476c077-11ac-4bed-b9df-d708497f8390 | volume.size | gauge | 1.0 | GB | 2013-12-16T12:22:17.366488 |
| 4476c077-11ac-4bed-b9df-d708497f8390 | volume.size | gauge | 1.0 | GB | 2013-12-16T12:22:14.839708 |
+--------------------------------------+-------------+-------+--------+------+----------------------------+
ubuntu@gate-devstack:~$ ceilometer sample-list -m volume
+--------------------------------------+--------+-------+--------+--------+----------------------------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+--------------------------------------+--------+-------+--------+--------+----------------------------+
| 4476c077-11ac-4bed-b9df-d708497f8390 | volume | gauge | 1.0 | volume | 2013-12-16T12:22:17.366488 |
| 4476c077-11ac-4bed-b9df-d708497f8390 | volume | gauge | 1.0 | volume | 2013-12-16T12:22:14.839708 |
+--------------------------------------+--------+-------+--------+--------+----------------------------+

This bug is reproduced because when creating volume in notifications queue appear two notifications: 'volume.create.start' and 'volume.create.end' and in ceilometer.volume.notifications.py variable 'event_types' contains 'volume.create.*'.
Therefore, when creating the volume are two records in the ceilometer database, first created, when appear 'volume.create.start' notification, the second created, when appear 'volume.create.end' notification.

TO RESOLVE:
Add validation that the record already exists in the database
or
Change 'volume.create.*' on 'volume.create.start' or 'volume.create.end'

Revision history for this message
Julien Danjou (jdanjou) wrote :

Definitely not a bug. There's no problem having a lot of samples, it can even be a safety guard.

Changed in ceilometer:
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.