samples query fails on mongo instance with data predating the advent of recorded_at attribute

Bug #1284608 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Eoghan Glynn

Bug Description

Where the metering store predates the advent of the recorded_at timestamp to samples:

  https://github.com/openstack/ceilometer/commit/0c51a0a6

sample queries that select older datapoints with fail with the mongodb storage driver, e.g.:

2014-02-25 11:57:52.429 31573 ERROR wsme.api [-] Server-side error: "__init__() takes exactly 14 arguments (13 given)". Detail:
Traceback (most recent call last):

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

  File "/opt/stack/ceilometer/ceilometer/api/controllers/v2.py", line 730, in get_all
    for e in pecan.request.storage_conn.get_samples(f, limit=limit)

  File "/opt/stack/ceilometer/ceilometer/storage/impl_mongodb.py", line 768, in _retrieve_samples
    yield models.Sample(**s)

TypeError: __init__() takes exactly 14 arguments (13 given)

Eoghan Glynn (eglynn)
Changed in ceilometer:
assignee: nobody → Eoghan Glynn (eglynn)
importance: Undecided → High
status: New → In Progress
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/76174

Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → icehouse-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

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

commit f984e9d0eb6edab95bcbb435affd078f06005fb1
Author: Eoghan Glynn <email address hidden>
Date: Tue Feb 25 16:55:46 2014 +0000

    Tolerate absent recorded_at on older mongo/db2 samples

    Fixes bug 1284608

    Prevents failure of a samples query against a mongo-like instance
    (i.e. either mongodb or db2) selecting metering data that predates
    the advent of the recorded_at attribute for samples:

      Ia0ff8bd07fd811fe8d3050d30971a05a277798d0

    Change-Id: If480321923e9166583bbea91c3878950bafbedf1

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