Rate limit settings not documented

Bug #1662637 reported by Sean McGinnis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Wishlist
Stephen Finucane

Bug Description

This is either not working or just badly in need of documentation.

Trying to test our API rate limiting functionality exposed by "cinder rate-limits" and "cinder absolute-limits". I can't figure out how to get API rate limits set to show up with these.

There are some older Nova documents showing how it was configured there [1]. It doesn't look like we've done much with rate limits since the split from nova. The only RateLimitingMiddleware class I can find in the Cinder code is here: [2]

I've attempted to update api-paste.ini with this to set a value for POSTs with the following entry:

paste.filter_factory = cinder.api.v2.limits:RateLimitingMiddleware.factory
limits =(POST, "*", .*, 120, MINUTE)

After restarting the service I still get the same (lack of) output from the CLI commands and it doesn't appear to affect the service settings.

It's quite possible my api-paste configuration is not correct, but I have not been able to find any cinder documentation stating how this is supposed to be configured. So we either need to fix the code to use this, and/or add some documentation so users can get this set up correctly.

[1] http://docs.openstack.org/liberty/config-reference/content/configuring-compute-API.html
[2] https://github.com/openstack/cinder/blob/a15459a27777e98599d70392191b0a6f0288ff34/cinder/api/v2/limits.py#L183

Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

Could we simply get rid of it as Nova already did? API rate limiting seems like something that should be done outside of OpenStack APIs. If I recall correctly, Rackspace had implemented external rate limiting in their cloud.

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

That would actually be my preference too. Just has some implications for our API and cinderclient, although those pieces could just stay where they are and just continue to not work.

Changed in cinder:
assignee: nobody → Stephen Finucane (stephenfinucane)
status: New → Confirmed
summary: - Rate limit settings not enforced
+ Rate limit settings not documented
tags: added: documentation
Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :
Changed in cinder:
importance: Undecided → Wishlist
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

A note about the proposal to simply remove this: there's a patch to deprecate it for removal [0], and I circulated a note on the ML asking whether any operators still use it [1]. Apparently some still do. So it would definitely be good to get this documented.

[0] https://review.opendev.org/c/openstack/cinder/+/807469
[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-September/024762.html

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :
Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/782518
Committed: https://opendev.org/openstack/cinder/commit/e6859ded3170580b2be692a3fbf320bb8d1eb567
Submitter: "Zuul (22348)"
Branch: master

commit e6859ded3170580b2be692a3fbf320bb8d1eb567
Author: Stephen Finucane <email address hidden>
Date: Tue Mar 23 12:44:24 2021 +0000

    docs: Add docs for 'RateLimitingMiddleware'

    Per bug #1662637, it seems this is a hangover from the forklift out of
    nova and can probably be deprecated. From what I can tell, hasn't
    happened yet though so at least acknowledge the existence of this
    middleware.

    Change-Id: I1d99d89dc782e697705cab05269821e8675e5fd8
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #1662637

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 20.0.0.0rc1

This issue was fixed in the openstack/cinder 20.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.