Bug 1219376

Summary: Wrong alarms order on 'severity' field
Product: [Community] RDO Reporter: Yurii Prokulevych <yprokule>
Component: openstack-ceilometerAssignee: Eoghan Glynn <eglynn>
Status: CLOSED EOL QA Contact: Yurii Prokulevych <yprokule>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: KiloCC: jruzicka, srevivo
Target Milestone: ---   
Target Release: Kilo   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-19 16:03:58 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:

Description Yurii Prokulevych 2015-05-07 08:05:46 UTC
Description of problem:
ceilometer query-alarms --orderby '[{"severity":"desc"}]' 
sorts alarms by severity's alphabetical order.

Version-Release number of selected component (if applicable):

openstack-ceilometer-common-2015.1.0-1.el7.noarch
openstack-ceilometer-alarm-2015.1.0-1.el7.noarch
openstack-ceilometer-compute-2015.1.0-1.el7.noarch
openstack-ceilometer-collector-2015.1.0-1.el7.noarch
openstack-ceilometer-notification-2015.1.0-1.el7.noarch
openstack-ceilometer-central-2015.1.0-1.el7.noarch
python-ceilometerclient-1.0.13-1.el7.noarch
openstack-ceilometer-api-2015.1.0-1.el7.noarch
python-ceilometer-2015.1.0-1.el7.noarch


Steps to Reproduce:

ceilometer query-alarms --orderby '[{"severity":"desc"}]'
+------------------+------------------+-------------------+----------+---------+------------+-------------------------------------------------------------------------------------+
| Alarm ID | Name | State | Severity | Enabled | Continuous | Alarm condition | Time constraints |
+------------------+------------------+-------------------+----------+---------+------------+-------------------------------------------------------------------------------------+
| 357ce1eb-***-d18 | TAlarm-1-mode | insufficient data | moderate | True | False | alarm_meter_1_moderate >= 3.0 during 3 x 60s | None |
| 5a6396ff-***a52 | ComAlrm-OR-mod | insufficient data | moderate | False | False | combinated states (OR) of 3c3b6692-***-3a98, f474b5ed-***-e2398 | None |
| 2d5298b5-***-7e7 | ComAlrm-AND-mod | insufficient data | moderate | False | False | combinated states (AND) of 3c3b6692-***-3a98, f474b5ed-***-2398 | None |
| 3c3b6692-***-a98 | TAlarm-1 | insufficient data | low | True | False | alarm_meter_1 >= 3.0 during 3 x 60s | None |
| 786d0809-***-9f5 | ComAlrm-OR-low | insufficient data | low | True | False | combinated states (OR) of 3c3b6692-***-3a98, 357ce1eb-***-5d18 | None |
| 73565d93-***-9fd | ComAlrm-AND-low | insufficient data | low | False | False | combinated states (AND) of 3c3b6692-***-a3a98, 357ce1eb-***-5d18 | None |
| f474b5ed-***-398 | TAlarm-1-crit | insufficient data | critical | False | False | alarm_meter_1_critical >= 3.0 during 3 x 60s | None |
| 733df9b1-***-587 | ComAlrm-OR-crit | insufficient data | critical | False | False | combinated states (OR) of 3c3b6692-***-3a98, f474b5ed-***-2398 | None |
| 4e823205-***-a3f | ComAlrm-AND-crit | insufficient data | critical | False | False | combinated states (AND) of 3c3b6692-***-3a98, f474b5ed-***-2398 | None |
+------------------+------------------+-------------------+----------+---------+------------+------------------------------------------------------------------+------------------+

ceilometer query-alarms --orderby '[{"severity":"asc"}]'
+------------------+------------------+-------------------+----------+---------+------------+----------------------------------------------------------------------------------+
| Alarm ID | Name | State | Severity | Enabled | Continuous | Alarm condition | Time constraints |
+------------------+------------------+-------------------+----------+---------+------------+----------------------------------------------------------------------------------+
| f474b5ed-***-398 | TAlarm-1-crit | insufficient data | critical | False | False | alarm_meter_1_critical >= 3.0 during 3 x 60s | None |
| 733df9b1-***-587 | ComAlrm-OR-crit | insufficient data | critical | False | False | combinated states (OR) of 3c3b6692-***-a98, f474b5ed-***-398 | None |
| 4e823205-***-73f | ComAlrm-AND-crit | insufficient data | critical | False | False | combinated states (AND) of 3c3b6692-***-a98, f474b5ed-***-398 | None |
| 3c3b6692-***-a98 | TdAlarm-1 | insufficient data | low | True | False | alarm_meter_1 >= 3.0 during 3 x 60s | None |
| 786d0809-***-9f5 | ComAlrm-OR-low | insufficient data | low | True | False | combinated states (OR) of 3c3b6692-***-a98, 357ce1eb-***-d18 | None |
| 73565d93-***-9fd | ComAlrm-AND-low | insufficient data | low | False | False | combinated states (AND) of 3c3b6692-***-a98, 357ce1eb-***-d18 | None |
| 357ce1eb-***-d18 | TAlarm-1-mod | insufficient data | moderate | True | False | alarm_meter_1_moderate >= 3.0 during 3 x 60s | None |
| 5a6396ff-***-a52 | ComAlrm-OR-mod | insufficient data | moderate | False | False | combinated states (OR) of 3c3b6692-***-a98, f474b5ed-***-398 | None |
| 2d5298b5-***-7e7 | CombAlrm-AND-mod | insufficient data | moderate | False | False | combinated states (AND) of 3c3b6692-***-a98, f474b5ed-***-398 | None |
+------------------+------------------+-------------------+----------+---------+------------+---------------------------------------------------------------+------------------+



Expected results:
Ordering has to be done using severity's value - low, moderate, critical (critical, moderate, low)

Comment 1 Chandan Kumar 2016-05-19 16:03:58 UTC
This bug is against a Version which has reached End of Life.
If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.