rate limiting not working in Essex

Bug #1020728 reported by Christian Berendt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

I configured the rate limits for nova-api in api-paste.ini by adding the line limits to the filter ratelimit. The filter ratelimit is used in composite:openstack_compute_api_v2 and composite:openstack_compute_api_v1 for keystone (using auth_strategy=keystone in nova.conf).

limits = ("POST", "*", ".*", 10, DAY);("POST", "*/servers", "^/servers", 10, DAY);("PUT", "*", ".*", 10, DAY);("GET", "*", ".*", 10, DAY);("DELETE", "*", ".*", 10, DAY)

I can receive the new rates using nova rate-limits. Looks good.

$ nova.sh rate-limits
+----------+-------------+-------+--------+------+----------------------+
| Verb | URI | Value | Remain | Unit | Next_Available |
+----------+-------------+-------+--------+------+----------------------+
| "DELETE" | "*" | 10 | 10 | DAY | 2012-07-03T20:31:15Z |
| "GET" | "*" | 10 | 10 | DAY | 2012-07-03T20:31:15Z |
| "POST" | "*" | 10 | 10 | DAY | 2012-07-03T20:31:15Z |
| "POST" | "*/servers" | 10 | 10 | DAY | 2012-07-03T20:31:15Z |
| "PUT" | "*" | 10 | 10 | DAY | 2012-07-03T20:31:15Z |
+----------+-------------+-------+--------+------+----------------------+

But if I now use the Nova API the rate limits doesn't change. For example if I call nova list I receive a GET request on nova-api, but the counter "Remain" is still 10. Rate limiting is activated in nova.conf with api_rate_limit=true.

Any idea why nova.api.openstack.compute.limits:RateLimitingMiddleware.factory got loaded and inititialized but is not working?

Tags: b1-systems
tags: added: b1-systems
Revision history for this message
Mark McLoughlin (markmc) wrote :

Christian: could you try this:

  (POST, *, .*, 10, DAY);(POST, */servers, ^/servers, 10, DAY);(PUT, *, .*, 10, DAY);(GET, *, .*, 10, DAY);(DELETE, *, .*, 10, DAY)

Pretty sure that's the issue

Changed in nova:
status: New → Invalid
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.