Comment 0 for bug 1315819

Revision history for this message
Liusheng (liusheng) wrote : ceilometer has no constraint of maximum of IntegerType

With mysql as storage backend, If I use following command to create a threshold alarm:

ceilometer alarm-threshold-create -m instance --name abd --evaluation-periods -1000000000000000000000000000000000000000000000000 --threshold 10

It will be created successfully, but this alarm cannot be evluated, the trace of alarm-evluator is:

[-] evaluating alarm d7796ce7-744e-439f-afca-60c2730b3a2e _evaluate_alarm /opt/stack/ceilometer/ceilometer/alarm/service.py:86
[-] alarm evaluation cycle failed
Traceback (most recent call last):
  File "/opt/stack/ceilometer/ceilometer/alarm/service.py", line 75, in _evaluate_assigned_alarms
    self._evaluate_alarm(alarm)
  File "/opt/stack/ceilometer/ceilometer/alarm/service.py", line 87, in _evaluate_alarm
    self.evaluators[alarm.type].obj.evaluate(alarm)
  File "/opt/stack/ceilometer/ceilometer/alarm/evaluator/threshold.py", line 203, in evaluate
    alarm.rule['query']
  File "/opt/stack/ceilometer/ceilometer/alarm/evaluator/threshold.py", line 63, in _bound_duration
    start = now - datetime.timedelta(seconds=window)
OverflowError: Python int too large to convert to C long