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>
}
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):
'''