alarm-threshold-create --query option is discarded

Bug #1271913 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ceilometerclient
Fix Released
High
Eoghan Glynn

Bug Description

When creating an alarm with the new alarm-threshold-create verb, the --query option is discarded.

So for example using:

    ceilometer alarm-threshold-create --name cpu_high --description 'instance running hot' \
   --meter-name cpu_util --threshold 70.0 --comparison-operator gt --statistic avg \
   --period 600 --evaluation-periods 3 \
   --alarm-action 'log://' \
   --query resource_id=INSTANCE_ID

results in a threshold alarm with a null query, whereas using the original alarm-create verb:

 ceilometer alarm-create --name cpu_high --description 'instance running hot' \
   --meter-name cpu_util --threshold 70.0 --comparison-operator gt --statistic avg \
   --period 600 --evaluation-periods 3 \
   --alarm-action 'log://' \
   --matching-metadata resource_id=INSTANCE_ID

results in the constraint being used as expected.

This is a simple but nasty bug because the query is absolutely crucial to the evaluation of threshold alarms as it's used to constrain the periodic statistics query that determines the alarm state. Without these constraints for say an alarm on cpu_util for a particular instance would instead be applied to the cpu_util for *all* instances visible to the alarm owner.

Eoghan Glynn (eglynn)
Changed in python-ceilometerclient:
importance: Undecided → High
status: New → In Progress
assignee: nobody → Eoghan Glynn (eglynn)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ceilometerclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/68637

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ceilometerclient (master)

Reviewed: https://review.openstack.org/68637
Committed: https://git.openstack.org/cgit/openstack/python-ceilometerclient/commit/?id=f6b91faae42343719ed94ab843f02dcbc20e3f39
Submitter: Jenkins
Branch: master

commit f6b91faae42343719ed94ab843f02dcbc20e3f39
Author: Eoghan Glynn <email address hidden>
Date: Thu Jan 23 13:25:17 2014 +0000

    Avoid discarding alarm-threshold-create --query option

    Fixes bug 1271913

    The query is crucial to the alarm evaluator statistics query
    being well-formed, so must not be discarded.

    Change-Id: I5ff8dcb420b932fc58dfef3dadfcbc4a4dc5cf66

Changed in python-ceilometerclient:
status: In Progress → Fix Committed
Changed in python-ceilometerclient:
milestone: none → 1.3.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.