'repeat_actions' default value is false if not setting in template

Bug #1375151 reported by Hang Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Angus Salkeld
Juno
Fix Released
Undecided
Unassigned

Bug Description

Below is the description about how "repeat_actions" would work,

# heat resource-type-show OS::Ceilometer::Alarm
    ... ...

    "repeat_actions": {
      "description": "False to trigger actions when the threshold is reached AND the alarm's state has changed. By default, actions are called each time the threshold is reached.",
      "default": "true",
      "required": false,
      "update_allowed": true,
      "type": "boolean",
      "immutable": false
    },
    ... ...

It states that the default value should be "true', even it isn't be explicitly set in the template.

But it seems the default value is false if not being set in the template. Actions are not called if alarm's state has NOT been changed.

Here are logs when "repeat_actions" was not set,
+---------------------------+--------------------------------------------------------------------------+
| Property | Value |
+---------------------------+--------------------------------------------------------------------------+
| alarm_actions | [u'http://172.16.100.88:8000/v1/signal/arn%3Aopenstack%3Aheat%3A%3Add0d5 |
| | 8342c4d4a36925943f572038fe9%3Astacks%2Fs-01%2F9b794a80-3c45-45d4-a39d-a6 |
| | 49d7512fcd%2Fresources%2FMultiregionScalingPolicy?Timestamp=2014-09-29T0 |
| | 7%3A24%3A16Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=c688601f35b543d2a |
| | 632f90d916ddf5e&SignatureVersion=2&Signature=yrCPf4%2BDniStzEsNywpy%2Fzr |
| | 5l9CzGFfPTYTcI45FZdI%3D'] |
| alarm_id | b8f0a5ab-f2c3-4b2c-b5af-4cf5cad24da3 |
| comparison_operator | lt |
| description | ScalingAlarmDownOne |
| enabled | True |
| evaluation_periods | 1 |
| exclude_outliers | False |
| insufficient_data_actions | [] |
| meter_name | cpu_util |
| name | s-01-ScalingAlarmOne-tsxzpgfdhopo-CPUAlarmLow-czpvgujdtskr |
| ok_actions | [] |
| period | 60 |
| project_id | dd0d58342c4d4a36925943f572038fe9 |
| query | metadata.user_metadata.stack == 9b794a80-3c45-45d4-a39d-a649d7512fcd |
| repeat_actions | False |
| state | ok |
| statistic | avg |
| threshold | 20.0 |
| type | threshold |
| user_id | bd222bd40a374d8181a716b3127411e6 |
+---------------------------+--------------------------------------------------------------------------+

Revision history for this message
Yanyan Hu (yanyanhu) wrote :

This should be caused by erroneous properties handling of ceilometer alarm resource.

Changed in heat:
assignee: nobody → Yanyan Hu (yanyanhu)
Revision history for this message
Qiming Teng (tengqim) wrote :

When fixing this bug, please consider also fixing the description. The current description is not easy to understand when comparing what Ceilometer says in 'ceilometer help alarm-create':

  --repeat-actions {True|False}
                                True if actions should be repeatedly notified
                                while alarm remains in target state. Defaults
                                to False.

Changed in heat:
status: New → Confirmed
Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → High
Revision history for this message
Angus Salkeld (asalkeld) wrote :

I have a fix for this, are you ok with me taking this bug over?

Revision history for this message
Yanyan Hu (yanyanhu) wrote :

Sure, no problem.

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

Changed in heat:
assignee: Yanyan Hu (yanyanhu) → Angus Salkeld (asalkeld)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/124943
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=04585f6107f7851d10c5393da74a30ac1c9e2c50
Submitter: Jenkins
Branch: master

commit 04585f6107f7851d10c5393da74a30ac1c9e2c50
Author: Angus Salkeld <email address hidden>
Date: Tue Sep 30 15:10:37 2014 +1000

    Make sure that property defaults are converted correctly

    If a developer defines a default boolean as "true", then we really want
    True when we do "self.properties['bla']" not 'true', otherwise this
    is not consistent.

    Change-Id: I3705e573e2fd68a04b26c5589d38f84d68641738
    Partial-bug: #1375151

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

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

commit adcdf7c9e32b28b1d1ca9ef014e3742f431cb655
Author: Angus Salkeld <email address hidden>
Date: Tue Oct 7 13:58:34 2014 +1000

    Use properties in ceilometer alarm not parsed_template('Properties')

    The main point of this patch is to pass the default values defined
    in the property schema into ceilometer.

    Closes-bug: #1375151
    Change-Id: Icfc917a02c2e6404213ec020a9aba24fcbb4168a

Eoghan Glynn (eglynn)
tags: added: juno-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/135918

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/135919

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/juno)

Reviewed: https://review.openstack.org/135918
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=b3db67b27417941c07f556a67931d0111f090837
Submitter: Jenkins
Branch: stable/juno

commit b3db67b27417941c07f556a67931d0111f090837
Author: Angus Salkeld <email address hidden>
Date: Tue Sep 30 15:10:37 2014 +1000

    Make sure that property defaults are converted correctly

    If a developer defines a default boolean as "true", then we really want
    True when we do "self.properties['bla']" not 'true', otherwise this
    is not consistent.

    Change-Id: I3705e573e2fd68a04b26c5589d38f84d68641738
    Partial-bug: #1375151
    (cherry picked from commit 04585f6107f7851d10c5393da74a30ac1c9e2c50)

tags: added: in-stable-juno
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/135919
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4b721a42ed270c2cf46efe46e7ac1e79e3f46871
Submitter: Jenkins
Branch: stable/juno

commit 4b721a42ed270c2cf46efe46e7ac1e79e3f46871
Author: Angus Salkeld <email address hidden>
Date: Tue Oct 7 13:58:34 2014 +1000

    Use properties in ceilometer alarm not parsed_template('Properties')

    The main point of this patch is to pass the default values defined
    in the property schema into ceilometer.

    Closes-bug: #1375151
    Change-Id: Icfc917a02c2e6404213ec020a9aba24fcbb4168a
    (cherry picked from commit adcdf7c9e32b28b1d1ca9ef014e3742f431cb655)

Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 2015.1.0
Zane Bitter (zaneb)
tags: removed: juno-backport-potential
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.