Ceilometer alarm notifier fails if Heat template does not define insufficient_data_actions

Bug #1224416 reported by Jukka Syrjanen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Mehdi Abaakouk

Bug Description

This problem occurs with Havana version of Ceilometer/Heat. I ran this with devstack pulled today.

The following patch has been taken into use so that the alarm info can be successfully inserted to ceilometer DB during heat stack create: https://review.openstack.org/#/c/45076/

ceilometer-alarm-notifier refuses to call Heat's webhook if the used template file does not define insufficient_data_actions in alarm definition. However, insufficient_data_actions is not defined as 'required' field in alarm definition in template. Used template file is attached.

Precondition is that the alarm has been triggered. In this case the alarm status was changed with "ceilometer alarm-update" command line tool.

log entry in ceilometer-alarm-notifier:
======================
2013-09-12 12:44:47.503 5317 ERROR ceilometer.alarm.service [req-77d5aef7-0448-4a87-9816-ab198ca2f00b None None]
Unable to notify for an alarm with no action
======================

The steps to reproduce the problem:
1) add the following to /etc/ceilometer/pipeline.yaml:
        - name: "accumulator"
          parameters:
              target:
                  name: "vm_down"
                  unit: "count"
                  type: "count"

2) restart ceilometer-acompute

3) Create the stack: heat stack-create ha -f <templateFileName>

4) when the stack is up, locate the alarm id of metric "vm_down" with
ceilometer alarm-list

5) Change the alarm status:
ceilometer alarm-update -a <alarmID> --state alarm

6) The log entry above appears in ceilometer-alarm-notifier within a minute. Consequently, the HARestarter of Heat does not get activated

Revision history for this message
Jukka Syrjanen (jukka-syrjanen) wrote :
Revision history for this message
Jukka Syrjanen (jukka-syrjanen) wrote :

Forgot to mention that you must give properties KeyName and ImageId suitable values in the template file

Julien Danjou (jdanjou)
Changed in ceilometer:
status: New → Triaged
importance: Undecided → Medium
milestone: none → havana-rc1
Mehdi Abaakouk (sileht)
Changed in ceilometer:
assignee: nobody → Mehdi Abaakouk (sileht)
Revision history for this message
Mehdi Abaakouk (sileht) wrote :

Action are not triggered if you change the state of the alarm through the API. This is normal.

In you use case, the error message occur because to alarm state are changed by ceilometer too, in ok or insufficient state.
Or you have not define actions for these states. And it show a error because actions are missing.

This is no really a bug but I will propose a change to not send a empty actions list through the rpc, to avoid unuseful rpc message and incorrect error message in log file.

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/47989

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

Reviewed: https://review.openstack.org/47989
Committed: http://github.com/openstack/ceilometer/commit/1feca031256f46029e7ed68fce7ab010f65eab38
Submitter: Jenkins
Branch: master

commit 1feca031256f46029e7ed68fce7ab010f65eab38
Author: Mehdi Abaakouk <email address hidden>
Date: Tue Sep 24 10:22:07 2013 +0200

    Don't send unuseful rpc alarm notification

    If the alarm have no actions for the new state we don't need to send a
    message through the rpc for notification, just log a debug message
    when it occur.

    Fixes bug 1224416

    Change-Id: I9aeb01e936dbacfbabb06e8b408d5ee04a93cb34

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-rc1 → 2013.2
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.