Files
horizon/openstack_dashboard/dashboards/project/containers
Tobias Urdin ceb677d489 Add SWIFT_PANEL_FULL_LISTING config option
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>
2025-10-09 13:04:54 +00:00
..
2022-02-04 16:22:07 +09:00
2022-02-04 16:26:54 +09:00
2023-09-20 21:15:13 +05:30