Periodic watcher task fails when OS::Heat::CWLiteAlarm is used

Bug #1395711 reported by Tatiana Kholkina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Tatiana Kholkina

Bug Description

I create a stack with the following template (minimal working example to reproduce the bug):

heat_template_version: 2013-05-23

resources:

  my_restarter:
    type: OS::Heat::HARestarter
    properties:
      InstanceId: {get_resource: my_server}

  my_server:
    type: OS::Nova::Server
    properties:
      flavor: m1.tiny
      image: Fedora-x86_64-20-20140618-sda

  my_alarm:
    type: OS::Heat::CWLiteAlarm
    properties:
      AlarmActions: [{ get_resource: my_restarter}]
      Period: 60

Stack is created successfully but 60 seconds later heat engine shows the following error message:

 File "/opt/stack/heat/heat/engine/watchrule.py", line 226, in get_alarm_state
   fn = getattr(self, 'do_%s' % self.rule['Statistic'])
 KeyError: 'Statistic'

Changed in heat:
assignee: nobody → Tetiana Lashchova (tlashchova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

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

Reviewed: https://review.openstack.org/137137
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=095249058f238a609a0f43515d8576731ff49b64
Submitter: Jenkins
Branch: master

commit 095249058f238a609a0f43515d8576731ff49b64
Author: Tetiana Lashchova <email address hidden>
Date: Tue Nov 25 18:44:27 2014 +0200

    Add 'required' attribute to OS::Heat::CWLiteAlarm properties

    Add 'required=True' relying on
    http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html

    Change-Id: I524729c084db9976fcefca8d7ebc16abd0c92ffe
    Closes-Bug: #1395711

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-2 → 2015.1.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.