evaluation periods effectively ignored for threshold alarm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
Undecided
|
ZhiQiang Fan | ||
Juno |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In the file ceilometer/
def _transition(self, alarm, statistics, compared):
The transition rules are currently hardcoded as:
- transitioning from a known state requires an unequivocal
set of datapoints
- transitioning from unknown is on the basis of the most
recent datapoint if equivocal
"""
and the _sufficient method:
def _sufficient(self, alarm, statistics):
"""Check for the sufficiency of the data for evaluation.
Ensure there is sufficient data for evaluation, transitioning to
unknown otherwise.
"""
sufficient = len(statistics) >= self.quorum
...
Note that self.quorum==1, regardless of evaluation_periods.
The current hard-wired policy effectively ignores the evaluation_periods parameter of the alarm.
Every alarm starts in the unknown state, so the first time there are any statistics at all available,
_sufficient() will return true and _transition will set the state based on how that first statistic
compares to the threshold.
Changed in ceilometer: | |
assignee: | nobody → ZhiQiang Fan (aji-zqfan) |
tags: | added: juno-backport-potential |
Changed in ceilometer: | |
milestone: | none → kilo-2 |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | kilo-2 → 2015.1.0 |
Actually don't understand how does evaluation_periods connect with quorum... Evaluation periods is about number of historical periods to evaluate the threshold (it'll be evaluation window), quorum is about minimum number of datapoints within sliding window to avoid unknown state... Hardcoded quorum is the only problem here I suppose...