Bug 1352922 - [RFE] Simple Tenant Usage Pagination Support
Summary: [RFE] Simple Tenant Usage Pagination Support
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Upstream M3
: 11.0 (Ocata)
Assignee: Diana Clarke
QA Contact: Joe H. Rahme
URL: https://blueprints.launchpad.net/nova...
Whiteboard: upstream_milestone_ocata-3 upstream_d...
Depends On:
Blocks: 1427448
TreeView+ depends on / blocked
 
Reported: 2016-07-05 13:39 UTC by Eoghan Glynn
Modified: 2019-09-09 15:30 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
This release adds pagination support to avoid resource-consuming usage requests on systems with a large number of instances. The v2.40 microversion of the nova API simple-tenant-usage endpoints use new optional query parameters 'limit' and 'marker' for pagination. The 'marker' option sets the starting point and the 'limit' option sets the number of records to be displayed after the starting point. If 'limit' is not set, nova will use the configurable 'max_limit' (1000 by default). Although older microversions will not accept these new query parameters, they will start to enforce the max_limit and results may be truncated as a result. Consider using the new microversion to avoid DoS-like usage requests and potentially truncated responses.
Clone Of:
Environment:
Last Closed: 2017-05-17 19:31:29 UTC
Target Upstream Version:
Embargoed:
panbalag: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 386093 0 None MERGED Simple tenant usage pagination 2020-08-17 15:31:55 UTC
OpenStack gerrit 386771 0 None MERGED Simple tenant usage pagination 2020-08-17 15:31:55 UTC
OpenStack gerrit 407825 0 None MERGED Microversion 2.40 - Simple tenant usage pagination 2020-08-17 15:31:55 UTC
OpenStack gerrit 410337 0 None MERGED Simple tenant usage pagination 2020-08-17 15:31:55 UTC
Red Hat Product Errata RHEA-2017:1245 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 23:01:50 UTC

Description Eoghan Glynn 2016-07-05 13:39:03 UTC
The simple tenant usage API can return extremely large amounts of data and provides no way to paginate the results. Because the API does not use the pagination code, it doesn't even respect the "max results" sanity limit. Because it can query a ton of data, it also causes the api workers to inflate their memory footprint to the size of the DB result set, which is large. Since horizon queries this by default, most users are affected unless their ops team is extremely diligent about purging deleted instances (which are returned by the API by design).

Cloned from https://blueprints.launchpad.net/nova/+spec/paginate-simple-tenant-usage

Comment 2 Stephen Gordon 2016-11-25 14:45:50 UTC
Hi Prasanth,

Can I please get a QA ack for this one?

Thanks,

Steve

Comment 13 Joe H. Rahme 2017-04-18 10:13:30 UTC
Hey Lukas,

You're correct. The `marker` is the last instance UUID in the `server_usages` list from the previous page.

Comment 15 errata-xmlrpc 2017-05-17 19:31:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1245


Note You need to log in before you can comment on or make changes to this bug.