From b0af0b1894e40eef4c9a560c85deffcd5df06564 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 17 Jan 2013 17:32:25 +0000 Subject: [PATCH] heat engine : watchrule don't run rule for every SampleCount We should not be triggering a run_rule (which is an alarm action) for every datapoint when the SampleCount statistic is specified, otherwise e.g IHA instances get replaced every heartbeat signal! run_rule should only be called in response to a rule evaluate(), or an explicit override via set_watch_state() ref bug 1100719 Change-Id: I91b144f24b542f48aa7fa98d8d8c404479e13483 Signed-off-by: Steven Hardy --- heat/engine/watchrule.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/heat/engine/watchrule.py b/heat/engine/watchrule.py index c29fa8f7..da33f4b5 100644 --- a/heat/engine/watchrule.py +++ b/heat/engine/watchrule.py @@ -261,8 +261,6 @@ class WatchRule(object): } wd = db_api.watch_data_create(None, watch_data) logger.debug('new watch:%s data:%s' % (self.name, str(wd.data))) - if self.rule['Statistic'] == 'SampleCount': - self.run_rule() def set_watch_state(self, state): ''' -- 2.45.2