Show HTTPInternalServerError for the metaquery not implemented

Bug #1237741 reported by Haomeng,Wang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Invalid
Medium
Mehdi Abaakouk
WSME
New
Undecided
Unassigned

Bug Description

I think for the "metaquery not implemented" we dont support, should not return "HTTPInternalServerError (HTTP 500)" error message for user from command line call, but we can find the actual result in the API log.

[root@osee26-control01 ~]# ceilometer meter-list -q metadata.instance_type=1
No handlers could be found for logger "ceilometerclient.common.http"
HTTPInternalServerError (HTTP 500)

2013-10-09 20:50:26.947 2012 ERROR wsme.api [-] Server-side error: "metaquery not implemented". Detail:
Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/wsmeext/pecan.py", line 70, in callfunction
    result = f(self, *args, **kwargs)

  File "/usr/lib/python2.6/site-packages/ceilometer/api/controllers/v2.py", line 760, in get_all
    for m in pecan.request.storage_conn.get_meters(**kwargs)]

  File "/usr/lib/python2.6/site-packages/ceilometer/storage/impl_sqlalchemy.py", line 397, in get_meters
    raise NotImplementedError(_('metaquery not implemented'))

NotImplementedError: metaquery not implemented

Mehdi Abaakouk (sileht)
Changed in ceilometer:
assignee: nobody → Mehdi Abaakouk (sileht)
Revision history for this message
Haomeng,Wang (whaom) wrote :

@Mehdi Abaakouk, I just find a bp which implement the SQL metadata query function, so this defect should be invalid once the bp code change is merged - https://review.openstack.org/#/c/49456/

Revision history for this message
Mehdi Abaakouk (sileht) wrote :

They are many other ceilometer parts that have NotImplmenetedError and the API should return 501 intead of 500.

For example some other BD backends have limited feature: http://docs.openstack.org/developer/ceilometer/install/dbreco.html

Julien Danjou (jdanjou)
Changed in ceilometer:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
gordon chung (chungg) wrote :

marking invalid since all backends support metaquery

Changed in ceilometer:
status: Triaged → Invalid
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.