From 890061cc2a5b65d5db2aba4040db4db3d725b09c Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Fri, 24 Feb 2012 14:39:17 +0000 Subject: [PATCH] Allow ratelimiting to be turned off. Useful when trying to run tempest, or similar tests. Change-Id: Iaf951e2f647f884421b21199522b5fcf86c0dd4e --- stack.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stack.sh b/stack.sh index 067ea7ebcd..8b69428661 100755 --- a/stack.sh +++ b/stack.sh @@ -834,8 +834,10 @@ if is_service_enabled n-api; then } replace_pipeline "ec2cloud" "ec2faultwrap logrequest totoken authtoken keystonecontext cloudrequest authorizer validator ec2executor" replace_pipeline "ec2admin" "ec2faultwrap logrequest totoken authtoken keystonecontext adminrequest authorizer ec2executor" - replace_pipeline "openstack_compute_api_v2" "faultwrap authtoken keystonecontext ratelimit osapi_compute_app_v2" - replace_pipeline "openstack_volume_api_v1" "faultwrap authtoken keystonecontext ratelimit osapi_volume_app_v1" + # allow people to turn off rate limiting for testing, like when using tempest, by setting OSAPI_RATE_LIMIT=" " + OSAPI_RATE_LIMIT=${OSAPI_RATE_LIMIT:-"ratelimit"} + replace_pipeline "openstack_compute_api_v2" "faultwrap authtoken keystonecontext $OSAPI_RATE_LIMIT osapi_compute_app_v2" + replace_pipeline "openstack_volume_api_v1" "faultwrap authtoken keystonecontext $OSAPI_RATE_LIMIT osapi_volume_app_v1" fi # Helper to clean iptables rules