From 4dc987eff3a6963706253a7007c794ca75326d2e Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Wed, 23 Oct 2013 07:33:45 -1000 Subject: [PATCH] Repeat Ceilometer alarm actions by default The policy actions assume repeat_actions=true. For the situation when cpu is high even when a new server is added. Here we would expect yet-another server to be added but what currently happens is the alarm will be stuck in the alarm state, but with no further actions. We need a default that it sane. Closes-bug: #1242168 Related-bug: #1223347 Change-Id: I4c6a084076a0cc01ebd0d7431d3fac559161e947 --- etc/heat/templates/AWS_CloudWatch_Alarm.yaml | 1 + heat/engine/resources/ceilometer/alarm.py | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/heat/templates/AWS_CloudWatch_Alarm.yaml b/etc/heat/templates/AWS_CloudWatch_Alarm.yaml index 79f020dc51..d2c1e7b6fe 100644 --- a/etc/heat/templates/AWS_CloudWatch_Alarm.yaml +++ b/etc/heat/templates/AWS_CloudWatch_Alarm.yaml @@ -69,6 +69,7 @@ Resources: Ref: Period evaluation_periods: Ref: EvaluationPeriods + repeat_actions: true threshold: Ref: Threshold alarm_actions: diff --git a/heat/engine/resources/ceilometer/alarm.py b/heat/engine/resources/ceilometer/alarm.py index df1952b3ed..76cda24227 100644 --- a/heat/engine/resources/ceilometer/alarm.py +++ b/heat/engine/resources/ceilometer/alarm.py @@ -80,12 +80,11 @@ class CeilometerAlarm(resource.Resource): }, 'repeat_actions': { 'Type': 'Boolean', - 'Default': 'false', - 'Description': _('True to trigger actions each time the threshold ' - 'is reached. ' - 'By default, actions are called when : ' - 'the threshold is reached AND the alarm\'s state ' - 'have changed.') + 'Default': 'true', + '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. ') }, 'matching_metadata': { 'Type': 'Map',