The swiftclient supports setting full_listing to True which will ignore the limit/marker parameters and internally do a while loop to retrieve all the containers or objects. We pass in full_listing=True to both get_container() and get_account() and in both cases that is bad, one reason it's bad is because it ignores any limit sent. Now that in itself is not bad since we dont use those parameters at all, in fact we rely on client side pagination in Angular using st-pagination for the hz-dynamic-table that lists all containers and objects. The bad part here is that with full_listing if we have a customer with 100k containers or 100k objects the Horizon REST API will try to gather all those resources and return it in the API response to the Angular client side code. This makes it easy for a end-user to starve Horizon of resources, create a container, upload 1M objects, go to Horizon and try to list the container and Horizon will after some refreshes hang because it's processing the requests for a long time or because it runs out of memory and crashes. This adds the configuration option SWIFT_PANEL_FULL_LISTING that defaults to True keeping the current behaviour but can be set to False by operators to prevent this issue until the Swift panel has been migrated to use correct pagination. Change-Id: Id41200aaeec3df4aff1ace887a42352728fc4419 Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
9 lines
318 B
YAML
9 lines
318 B
YAML
---
|
|
features:
|
|
- |
|
|
Added new configuration option ``SWIFT_PANEL_FULL_LISTING`` that
|
|
defaults to ``True``. This configuration option can be set to
|
|
``False`` to prevent Horizon from doing full listing of containers
|
|
and objects in the Swift panel that can cause high resource
|
|
consumption in Horizon.
|