Combination alarm doesn't change sate when one of alarms is in 'insufficient data' state

Bug #1442613 reported by Yurii Prokulevych
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
ZhiQiang Fan

Bug Description

Ceilometer 2014.2 Juno release.
When one of the alarms within combination one changes state to 'alarm' state and 2nd alarm is in 'insufficient data' state, then
combination alarm doesn't change state to 'alarm'.

Operator used with combination alarm 'OR'.

# ceilometer alarm-history 41517047-d40e-4cd6-a8dc-f9151a00ac9b -q 'timestamp>2015-04-10T12:00:00'
+------+-----------+--------+
| Type | Timestamp | Detail |
+------+-----------+--------+
+------+-----------+--------+
# ceilometer alarm-history 2792d7e9-92f8-4a67-9ded-73368a42f629 -q 'timestamp>2015-04-10T12:00:00'
+------+-----------+--------+
| Type | Timestamp | Detail |
+------+-----------+--------+
+------+-----------+--------+
# ceilometer alarm-history 1c260480-5760-440a-bd2e-f07e08c29a72 -q 'timestamp>2015-04-10T12:00:00'
+------+-----------+--------+
| Type | Timestamp | Detail |
+------+-----------+--------+
+------+-----------+--------+

# ceilometer alarm-list
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+
| Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints |
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+
| 1c260480-5760-440a-bd2e-f07e08c29a72 | IuriiAlarm2 | insufficient data | True | False | alarm_meter_2 >= 5.0 during 3 x 60s | None |
| 2792d7e9-92f8-4a67-9ded-73368a42f629 | CombinationOR_Alarm1 | insufficient data | True | False | combinated states (OR) of 1c260480-5760-440a-bd2e-f07e08c29a72, 41517047-d40e-4cd6-a8dc-f9151a00ac9b | None |
| 41517047-d40e-4cd6-a8dc-f9151a00ac9b | IuriiAlarm1 | insufficient data | True | False | alarm_meter_1 >= 3.0 during 3 x 60s | None |
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+

[Triggering transition to 'alarm' state]
# ceilometer sample-create --meter-name 'alarm_meter_2' --resource-id 'alarm_resource_2' --meter-type 'cumulative' --meter-unit 'S' --sample-volume 8.0
+-------------------+--------------------------------------------+
| Property | Value |
+-------------------+--------------------------------------------+
| message_id | a97f5910-df7a-11e4-8e5f-3417ebe649d5 |
| name | alarm_meter_2 |
| project_id | 85b6e8ab730b4dc7984dbce7ee072cf5 |
| resource_id | alarm_resource_2 |
| resource_metadata | {} |
| source | 85b6e8ab730b4dc7984dbce7ee072cf5:openstack |
| timestamp | 2015-04-10T12:11:05.064887 |
| type | cumulative |
| unit | S |
| user_id | 9c1c7f2a7600433f9f98d7bc9a37544d |
| volume | 8.0 |
+-------------------+--------------------------------------------+

# ceilometer alarm-history 1c260480-5760-440a-bd2e-f07e08c29a72 -q 'timestamp>2015-04-10T12:00:00'
+------------------+----------------------------+--------------+
| Type | Timestamp | Detail |
+------------------+----------------------------+--------------+
| state transition | 2015-04-10T12:11:42.053000 | state: alarm |
+------------------+----------------------------+--------------+
# ceilometer alarm-history 2792d7e9-92f8-4a67-9ded-73368a42f629 -q 'timestamp>2015-04-10T12:00:00'
+------+-----------+--------+
| Type | Timestamp | Detail |
+------+-----------+--------+
+------+-----------+--------+
# ceilometer alarm-history 41517047-d40e-4cd6-a8dc-f9151a00ac9b -q 'timestamp>2015-04-10T12:00:00'
+------+-----------+--------+
| Type | Timestamp | Detail |
+------+-----------+--------+
+------+-----------+--------+

# ceilometer alarm-list
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+
| Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints |
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+
| 1c260480-5760-440a-bd2e-f07e08c29a72 | IuriiAlarm2 | alarm | True | False | alarm_meter_2 >= 5.0 during 3 x 60s | None |
| 2792d7e9-92f8-4a67-9ded-73368a42f629 | CombinationOR_Alarm1 | insufficient data | True | False | combinated states (OR) of 1c260480-5760-440a-bd2e-f07e08c29a72, 41517047-d40e-4cd6-a8dc-f9151a00ac9b | None |
| 41517047-d40e-4cd6-a8dc-f9151a00ac9b | IuriiAlarm1 | insufficient data | True | False | alarm_meter_1 >= 3.0 during 3 x 60s | None |
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+

[Waiting until alarm transitioned to 'inssufficient data' state]
# ceilometer alarm-list
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+
| Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints |
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+
| 1c260480-5760-440a-bd2e-f07e08c29a72 | IuriiAlarm2 | insufficient data | True | False | alarm_meter_2 >= 5.0 during 3 x 60s | None |
| 2792d7e9-92f8-4a67-9ded-73368a42f629 | CombinationOR_Alarm1 | insufficient data | True | False | combinated states (OR) of 1c260480-5760-440a-bd2e-f07e08c29a72, 41517047-d40e-4cd6-a8dc-f9151a00ac9b | None |
| 41517047-d40e-4cd6-a8dc-f9151a00ac9b | IuriiAlarm1 | insufficient data | True | False | alarm_meter_1 >= 3.0 during 3 x 60s | None |
+--------------------------------------+----------------------+-------------------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+

# ceilometer alarm-history 41517047-d40e-4cd6-a8dc-f9151a00ac9b -q 'timestamp>2015-04-10T12:00:00'
+------+-----------+--------+
| Type | Timestamp | Detail |
+------+-----------+--------+
+------+-----------+--------+
# ceilometer alarm-history 2792d7e9-92f8-4a67-9ded-73368a42f629 -q 'timestamp>2015-04-10T12:00:00'
+------+-----------+--------+
| Type | Timestamp | Detail |
+------+-----------+--------+
+------+-----------+--------+
# ceilometer alarm-history 1c260480-5760-440a-bd2e-f07e08c29a72 -q 'timestamp>2015-04-10T12:00:00'
+------------------+----------------------------+--------------------------+
| Type | Timestamp | Detail |
+------------------+----------------------------+--------------------------+
| state transition | 2015-04-10T12:15:42.098000 | state: insufficient data |
| state transition | 2015-04-10T12:11:42.053000 | state: alarm |
+------------------+----------------------------+--------------------------+

It would be great if 'alarm' state is considered as higher priority than 'insufficient data' state, at least for the 'OR' operator within combination alarm.

Or I'm missing something?

Thanks,
Yurii

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

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

Changed in ceilometer:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
status: New → In Progress
ZhiQiang Fan (aji-zqfan)
Changed in ceilometer:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/172515
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=b1b7c8056ed160f33bd9ee0149ec4c7b3b4c4972
Submitter: Jenkins
Branch: master

commit b1b7c8056ed160f33bd9ee0149ec4c7b3b4c4972
Author: ZhiQiang Fan <email address hidden>
Date: Sat Apr 11 01:09:27 2015 +0800

    fix combination alarm with operator == 'or'

    if combination alarm's operator is 'or', then when evaluating it,
    its state should be 'alarm' as long as there is one depended alarm
    is triggered.

    Change-Id: I87cc29c7556598a937aaea8abc745f4ceaca0531
    Closes-Bug: #1442613

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → liberty-1
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: liberty-1 → 5.0.0
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.