Get volumes REST reply does not have marker when default limit is reached

Bug #1288429 reported by Steven Kaufer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Steven Kaufer

Bug Description

Both the /volumes and /volumes/details APIs support pagination. When the request includes the "limit" parameters, then a "next" link is included in the reply if the number of volumes that match the query is greater than or equal to the limit.

The problem occurs when the caller does not include the limit parameter but the total number of volumes is greater than or equal to the default "CONF.osapi_max_limit". When this occurs, the number of volumes in the reply is "osapi_max" but there is no "next" link. Therefore, the caller cannot determine if there are any more volumes and has no marker value such that they can retrieve the rest of the volumes.

The fix for this is to include the "next" link when the total number of volumes is greater than or equal to the default limit, even if the "limit" parameter is not supplied.

Steven Kaufer (kaufer)
Changed in cinder:
assignee: nobody → Steven Kaufer (kaufer)
Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → High
status: New → Triaged
milestone: none → icehouse-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/78678
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=b63c28b7276d4c320fde8f481f61611d28278900
Submitter: Jenkins
Branch: master

commit b63c28b7276d4c320fde8f481f61611d28278900
Author: Steven Kaufer <email address hidden>
Date: Thu Mar 6 17:20:50 2014 +0000

    Include next link when default limit is reached

    The /volumes and /volumes/details APIs support pagination and a
    "next" link should be included when more data is available. When
    the default "osapi_max" limit is reached then the "next" link is
    not included in the API reply. In this case, the caller cannot
    determine if there are any more volumes and has no marker value
    such that they can retrieve the rest of the volumes.

    The fix for this is to include the "next" link when the number of
    volumes being returned is the maximum limit, even if the "limit"
    parameter is not supplied.

    Change-Id: I2f04192e67f80232b4019194f718625dbaf78fa6
    Closes-bug: 1288429

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
Steven Kaufer (kaufer) wrote :

This fix caused a regression that I didn't catch until the fix was committed. I've address this under https://bugs.launchpad.net/cinder/+bug/1289124

Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-rc1 → 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.