SQLAlchemy backend do not list resource correctly with timestamp

Bug #1144837 reported by Julien Danjou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Julien Danjou

Bug Description

The following test:

        data = self.get('/projects/project-id/resources',
                        start_timestamp=datetime.datetime(
                            2012, 7, 2, 10, 40).isoformat(),
                        end_timestamp=datetime.datetime(
                            2012, 7, 2, 10, 41).isoformat())

Doesn't return good values with MySQL backend. The problem is that the impl_sqlalchemy code tries to use the 'timestamp' field of the Resource model, but that's just the timestamp of the last receive Meter, and comparing against this is wrong.

Julien Danjou (jdanjou)
Changed in ceilometer:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Julien Danjou (jdanjou)
milestone: none → grizzly-rc1
status: Confirmed → 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/23534

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/23534
Committed: http://github.com/openstack/ceilometer/commit/98ac1d30f59f725cdbcb886501f08d3921a232a5
Submitter: Jenkins
Branch: master

commit 98ac1d30f59f725cdbcb886501f08d3921a232a5
Author: Julien Danjou <email address hidden>
Date: Mon Mar 4 18:33:39 2013 +0100

    api: run list_resources test against SQL

    This led me to discover and fix bug #1144837, which makes the SQL engine
    returns correctly the list of resources when asked.

    This also fixes a bug in the /resources listing in MongoDB driver: it used
    to filter on the resource db, which only contains the most recent up to date
    version of some fields, and returns wrong results.

    This also fixes bug #1131349

    Change-Id: I7441a8f2839c7db198c80de75f5c39f0dd219813
    Signed-off-by: Julien Danjou <email address hidden>

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: grizzly-rc1 → 2013.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.