Do not display all if resource exceeds the osapi_max_limit.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-cinderclient |
Incomplete
|
Wishlist
|
TommyLike |
Bug Description
We added the feature 'List all the request items when the list is over osapi_max_limit'[1] since Kilo.
It's a nice addition to the list command which enables the administrator to show all the resources he has, but there comes another question that the administrator could have thousands of volumes in the real environment and trigger such an operation ( request repeatedly and assembly resources in the client ) could consume a lot of resources (see the picture added below), and it's also not easy to handle the output if over 1000 thousands records are displayed.
It's also an inconsistent as lots of the openstack projects only display records <= osapi_max_limit once a time.
[1] https:/
[2] nova: https:/
[3] manila: https:/
summary: |
- cinder list all command consumes lots of resource when handling lots of - volumes + Do not display all resource if response exceeds the max size. |
summary: |
- Do not display all resource if response exceeds the max size. + Do not display all if resource exceeds the osapi_max_limit. |
Changed in python-cinderclient: | |
assignee: | nobody → TommyLike (hu-husheng) |
https:/ /review. openstack. org/#/c/ 134133/ is arguably implementing the wrong default behavior.
We have something similar in python-novaclient where if you pass limit=-1 then that means "no limit" and the client will page through the results automatically and display everything until there are no more pages.
I'd suggest changing the default limit behavior in python-cinderclient to be similar, so that the user opts into getting unlimited results, else the default is just enforced via the configurable limit on the server side. It would be a behavior change though so a release note would definitely be needed, and likely at least a minor version change in the client.