Wrong alarms order on 'severity' field

Bug #1452254 reported by Yurii Prokulevych
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Aodh
Fix Released
Low
Liusheng
Ceilometer
Invalid
Undecided
sanjana

Bug Description

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 |
+------------------+------------------+-------------------+----------+---------+------------+---------------------------------------------------------------+------------------+

With 'ascending' order alarms are grouped in this way:
    - critical
    - low
    - moderate

And with 'descending' order:
    - moderate
    - low
    - critical

Ordering has to be done using severity's value - low, moderate, critical (critical, moderate, low), IMHO.

Or I'm missing something?

Thanks,
Yurii

Revision history for this message
Yurii Prokulevych (yprokule) wrote :

Ceilometer's versions:
rpm -qa | grep ceilo
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

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

currently, it is sorted by severity alphabetic order.... not by meanings....

Changed in ceilometer:
importance: Undecided → Low
Changed in ceilometer:
assignee: nobody → Emma Foley (emma-l-foley)
Revision history for this message
Chris Dent (cdent) wrote :

Emma, are you still planning to do this? Any timeline?

Revision history for this message
Chris Dent (cdent) wrote :

I've added aodh, because if this is a problem in alarming then it will need to be fixed there.

It's not clear how critical this really is, though.

Revision history for this message
Emma Foley (emma-l-foley) wrote :

Hi Chris, I'm still planning on working on this, but was unsure of what was going on with the Aodh split. I don't have a timeline, hopefully in the next month or so.

Changed in aodh:
assignee: nobody → Emma Foley (emma-l-foley)
Changed in ceilometer:
assignee: Emma Foley (emma-l-foley) → nobody
Julien Danjou (jdanjou)
Changed in aodh:
status: New → Triaged
Changed in ceilometer:
status: New → Triaged
Changed in aodh:
importance: Undecided → Low
Revision history for this message
gordon chung (chungg) wrote :

hi Emma,

this should probably be patched in Aodh. we can decided whether we want to backport to ceilometer afterwards.

sanjana (sanjana)
Changed in ceilometer:
assignee: nobody → sanjana (sanjana)
sanjana (sanjana)
Changed in aodh:
assignee: Emma Foley (emma-l-foley) → sanjana (sanjana)
sanjana (sanjana)
Changed in aodh:
status: Triaged → In Progress
Vishal (vishaldhanopia)
tags: added: aodh ceilometer
gordon chung (chungg)
Changed in aodh:
status: In Progress → Triaged
Changed in ceilometer:
assignee: sanjana (sanjana) → nobody
Changed in aodh:
assignee: sanjana (sanjana) → nobody
Revision history for this message
sanjana (sanjana) wrote :

Trying to replicate and fix the same in my test environment. WIP.

Changed in aodh:
assignee: nobody → sanjana (sanjana)
sanjana (sanjana)
Changed in ceilometer:
assignee: nobody → sanjana (sanjana)
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

ceilometer now doesn't have alarm code, mark it as invalid

Changed in ceilometer:
status: Triaged → Invalid
importance: Low → Undecided
sanjana (sanjana)
Changed in aodh:
status: Triaged → In Progress
Revision history for this message
sanjana (sanjana) wrote :

What kind of tests should i add to support this feature?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to aodh (master)

Fix proposed to branch: master
Review: https://review.openstack.org/328230

Changed in aodh:
assignee: sanjana (sanjana) → Liusheng (liusheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to aodh (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/330936

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to aodh (master)

Reviewed: https://review.openstack.org/330936
Committed: https://git.openstack.org/cgit/openstack/aodh/commit/?id=352ec64c95e0427cc1453e7427278c9505a6610e
Submitter: Jenkins
Branch: master

commit 352ec64c95e0427cc1453e7427278c9505a6610e
Author: liusheng <email address hidden>
Date: Fri Jun 17 15:45:01 2016 +0800

    Correct the order when sorting by "severity"

    Related to change[1], since we have supported pagination query now, we
    need to also fix the ordering of 'severity' in listing alarms.

    [1] I69531e3b53a11026a35a40a415f48b7bb838010b

    Change-Id: Icb5239f1c4a5ef1e7e5733bc440eed12bb2f5b9f
    Related-Bug: #1452254

Changed in aodh:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to aodh (master)

Reviewed: https://review.openstack.org/328230
Committed: https://git.openstack.org/cgit/openstack/aodh/commit/?id=472c2867a7bd3989a1d1290a0ae63ae9b22b1606
Submitter: Jenkins
Branch: master

commit 472c2867a7bd3989a1d1290a0ae63ae9b22b1606
Author: sanjana <email address hidden>
Date: Fri Jun 10 15:44:30 2016 +0530

    Fixing ordering of 'severity' in alarms

    The ordering of severity in alarms is done
    alphabetically. It would be more appropriate
    if the ordering is done based on value of
    severity. This patch fixes the ordering.

    Closes-bug: #1452254
    Co-Authored-By: liusheng <email address hidden>

    Change-Id: I69531e3b53a11026a35a40a415f48b7bb838010b

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/aodh 3.0.0.0b2

This issue was fixed in the openstack/aodh 3.0.0.0b2 development milestone.

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.