Mesure request only return empty list if the timeframe is too small for the granularity

Bug #1520322 reported by Stéphane Albert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnocchi
Fix Released
Medium
Julien Danjou

Bug Description

Requesting measures from gnocchi doesn't return enough information if your start and stop timeframe is smaller than granularity.
Due to this we don't know if we get an empty response because there is no data or just because granularity is too high and gnocchi can't find a correct match.

Revision history for this message
Stéphane Albert (sheeprine) wrote :
Julien Danjou (jdanjou)
Changed in gnocchi:
status: New → Triaged
importance: Undecided → Medium
milestone: none → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gnocchi (master)

Fix proposed to branch: master
Review: https://review.openstack.org/252525

Changed in gnocchi:
assignee: nobody → Julien Danjou (jdanjou)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gnocchi (master)

Reviewed: https://review.openstack.org/252525
Committed: https://git.openstack.org/cgit/openstack/gnocchi/commit/?id=1b3025bf1c28c1faf7af94b7aaba2a1daf285e99
Submitter: Jenkins
Branch: master

commit 1b3025bf1c28c1faf7af94b7aaba2a1daf285e99
Author: Julien Danjou <email address hidden>
Date: Wed Dec 2 18:10:39 2015 +0100

    storage: round back from_timestamp in get_measures()

    This makes sure that if a user request "2014-01-01 12:23" and we have
    ("2014-01-01 12:20", 300), we do return this too.

    This avoids getting 0 point in the API request when the granularity is
    larger than the timespan requested.

    Change-Id: Id7c97308043419555514287df83c3f7cd96cca26
    Closes-Bug: #1520322

Changed in gnocchi:
status: In Progress → Fix Committed
Julien Danjou (jdanjou)
Changed in gnocchi:
milestone: next → 2.0.0
status: Fix Committed → Fix Released
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.