no metaquery implementation in sqlalchemy DB backends

Bug #1093625 reported by Brooklyn
30
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
gordon chung

Bug Description

use ceilimeter-client to get resources from ceilometer-api v1 raises "NotImplementedError: metaquery not implemented".

Traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 298, in __call__
    return self.app(env, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/stack/ceilometer/ceilometer/api/v1/blueprint.py", line 245, in list_resources_by_source
    return _list_resources(source=source)
  File "/opt/stack/ceilometer/ceilometer/api/v1/blueprint.py", line 188, in _list_resources
    return flask.jsonify(resources=list(resources))
  File "/opt/stack/ceilometer/ceilometer/storage/impl_sqlalchemy.py", line 255, in get_resources
    raise NotImplementedError('metaquery not implemented')
NotImplementedError: metaquery not implemented

Brooklyn (yuanotes)
Changed in ceilometer:
assignee: nobody → Brooklyn (yuanotes)
Revision history for this message
Nick Barcet (nijaba) wrote :
Changed in ceilometer:
status: New → Confirmed
importance: Undecided → Medium
Lianhao Lu (lianhao-lu)
summary: - get resource from ceilometer-api raises metaquery not implemented error
+ no metaquery implementation in sqlalchemy DB backends
Changed in ceilometer:
milestone: none → grizzly-3
Nick Barcet (nijaba)
Changed in ceilometer:
milestone: grizzly-3 → grizzly-rc1
Julien Danjou (jdanjou)
Changed in ceilometer:
assignee: Brooklyn (yuanotes) → nobody
milestone: grizzly-rc1 → none
Revision history for this message
Guangyu Suo (yugsuo) wrote :

The metadata of the resource is very useful for some conditions. Making it as one column of the meter table or resource table is not very convenient, so I think we'd better to add another metadata table to record the key-values, and join to meter or resource table.

Revision history for this message
Kevin Carter (kevin-carter) wrote :

I agree with Guangyu, but if this is to be not implemented at this time, in havana, i feel like we may be better off setting "metaquery" as a log statement instead of raising an exception which makes all stats unavailable. While this may not be the most ideal approach it provide for functionality. Thoughts?

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/49784

Changed in ceilometer:
assignee: nobody → Kevin Carter (kevin-carter)
status: Confirmed → In Progress
Revision history for this message
Kevin Carter (kevin-carter) wrote :

This change set seems to be on track to solving this issue : https://review.openstack.org/#/c/49456/

Changed in ceilometer:
assignee: Kevin Carter (kevin-carter) → nobody
gordon chung (chungg)
Changed in ceilometer:
assignee: nobody → gordon chung (chungg)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/49456
Committed: http://github.com/openstack/ceilometer/commit/1570462507eae1478123de25dbadc64b09c82af3
Submitter: Jenkins
Branch: master

commit 1570462507eae1478123de25dbadc64b09c82af3
Author: Gordon Chung <email address hidden>
Date: Wed Oct 2 15:45:26 2013 -0400

    enable sql metadata query

    explode metadata key/values to their own tables/rows (based on type).
    build a key string using dot notation similar to other nosql db
    and filter based on that.

    Blueprint: sqlalchemy-metadata-query
    Related-Bug: #1093625

    Change-Id: I2076e67b79448f98124a57b62b5bfed7aa8ae2ad

gordon chung (chungg)
Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
ChenZheng (chen-zheng)
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ceilometer (stable/havana)

Related fix proposed to branch: stable/havana
Review: https://review.openstack.org/80456

Thierry Carrez (ttx)
Changed in ceilometer:
milestone: icehouse-1 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (stable/havana)

Change abandoned by ChenZheng (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/80456

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.