Incorrectly specifying an aggregate function when requesting statistics causes 500 instead of the correct 400

Bug #1428658 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
Chris Dent
WSME
Fix Released
Undecided
Unassigned

Bug Description

When requesting statistics from the ceilometer api and asking for just one aggregate function, if you make the request wrongly and state "aggregate=max" instead of "aggregate.func=max" a 500 is raised from an untrapped AttributeError. Note that if you specify a completely unknown parameter (such as "moo=cow") a 400 is raised. A 400 is what we would expect when any parameter is wrong.

    - name: get sample statistics select aggregate bad format
      desc: causes 500 with uncaught AttributeError
      xfail: true
      url: /v2/meters/apples/statistics?aggregate=max
      status: 400

Mehdi Abaakouk (sileht)
Changed in wsme:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

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

Changed in ceilometer:
assignee: nobody → Mehdi Abaakouk (sileht)
status: New → In Progress
Changed in ceilometer:
assignee: Mehdi Abaakouk (sileht) → Chris Dent (chdent)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/208467
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=d7428b7c3873bb47683c4f4d547fce138b79a74b
Submitter: Jenkins
Branch: master

commit d7428b7c3873bb47683c4f4d547fce138b79a74b
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Aug 3 14:41:42 2015 +0200

    Update tests to reflect WSME 0.8 fixes

    All these bugs are now fixed in wsme 0.8.0

    Closes-bug: #1424642
    Closes-bug: #1423634
    Closes-bug: #1419110
    Closes-bug: #1428185
    Closes-bug: #1428628
    Closes-bug: #1428658
    Closes-bug: #1428624

    Change-Id: Iea8507ebc54f42786a44bfcd96246b88dd998bf0

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: liberty-3 → 5.0.0
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.