limit constraint should be applied on storage.base.Connection

Bug #1496677 reported by ZhiQiang Fan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
ZhiQiang Fan

Bug Description

we have applied limit constraint for almost all of the major database, but get_meters and get_resources in storage.base.Connection (yes, the interface itself) have missed it. We should add limit constraint for them as well.

And there is another problem associated with the limit parameter, see:

$ ceilometer -d meter-list -q x=y

ceilometerclient.openstack.common.apiclient.exceptions.BadRequest: Unknown argument: "x": unrecognized field in query: [<Query u'x' eq u'y' >], valid keys: ['limit', 'project', 'resource', 'source', 'user'] (HTTP 400) (Request-ID: req-9881e52b-d0ee-46cd-b259-31bb9682f2ad)

the limit should not be one of the valid keys for query filter, we need to treat limit as an internal parameter, because we already use it as a parameter in API and already check it in that level.

ZhiQiang Fan (aji-zqfan)
Changed in ceilometer:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Revision history for this message
Rohit Jaiswal (rohit-jaiswal-3) wrote :

Seems very similar to https://bugs.launchpad.net/ceilometer/+bug/1494245 which got fixed recently.

Changed in ceilometer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

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

commit 5c17ff6470fd8b499d5187fdd5ee6f1c5ed4f3c3
Author: ZhiQiang Fan <email address hidden>
Date: Wed Sep 16 05:05:08 2015 -0700

    apply limit constraint on storage base interface

    Currently we have implemented limit constraint on get_meters,
    get_resources, get_samples and query_samples on most of major databases,
    but haven't applied such change on storage interface of get_meters and
    get_resources, this patch adds parameter limit to those two methods.

    Change-Id: I10e43e082ec9fd87dcd491299a57c0116009220e
    Closes-Bug: #1496677

Changed in ceilometer:
status: In Progress → Fix Committed
gordon chung (chungg)
Changed in ceilometer:
milestone: none → liberty-rc1
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: liberty-rc1 → 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.