← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1288466] Re: Get servers REST reply does not have marker when default limit is reached

 

** Changed in: nova/icehouse
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1288466

Title:
  Get servers REST reply does not have marker when default limit is
  reached

Status in OpenStack Compute (Nova):
  Fix Released
Status in OpenStack Compute (nova) icehouse series:
  Fix Released

Bug description:
  Both the /servers and /servers/details APIs support pagination. When
  the request includes the "limit" parameters, then a "next" link is
  included in the reply if the number of servers 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 servers is greater than or equal to
  the default "CONF.osapi_max_limit". When this occurs, the number of
  servers in the reply is "osapi_max" but there is no "next" link.
  Therefore, the caller cannot determine if there are any more servers
  and has no marker value such that they can retrieve the rest of the
  servers.

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

  The documentation also says that the "next" link is required:
  http://docs.openstack.org/api/openstack-compute/2/content
  /Paginated_Collections-d1e664.html

  The fix appears to be in the _get_collection_links function in nova/api/openstack/common.py. The logic needs to be updated so that the "next"
  link is included if the total number of items returned equals the minimum of either the "limit" paramater or the "CONF.osapi_max_limit" value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1288466/+subscriptions


References