Skip to content

Commit

Permalink
heat engine : watchrule don't run rule for every SampleCount
Browse files Browse the repository at this point in the history
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 <shardy@redhat.com>
  • Loading branch information
Steven Hardy committed Jan 17, 2013
1 parent 293d775 commit b0af0b1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions heat/engine/watchrule.py
Expand Up @@ -261,8 +261,6 @@ def create_watch_data(self, data):
}
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):
'''
Expand Down

0 comments on commit b0af0b1

Please sign in to comment.