From ac15df8ab9c1937553894f26b433a24447a0fc6f Mon Sep 17 00:00:00 2001 From: colin-hanson-zocdoc Date: Mon, 7 Aug 2017 09:53:20 -0400 Subject: [PATCH] [cloud] Extend AWSRetry to also retry on `Throttling` exceptions (#22698) We use ansible+cloudformation pretty heavily in our CI environments and occasionally bump into throttling issues. By adding this error code to the retry system we should be able to achieve better stability. --- lib/ansible/module_utils/ec2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/ec2.py b/lib/ansible/module_utils/ec2.py index 7ac6ae1fcc8..b7ecaac1af1 100644 --- a/lib/ansible/module_utils/ec2.py +++ b/lib/ansible/module_utils/ec2.py @@ -85,7 +85,8 @@ class AWSRetry(CloudRetry): # https://github.com/boto/boto3/issues/876 (and linked PRs etc) retry_on = [ 'RequestLimitExceeded', 'Unavailable', 'ServiceUnavailable', - 'InternalFailure', 'InternalError', 'TooManyRequestsException' + 'InternalFailure', 'InternalError', 'TooManyRequestsException', + 'Throttling' ] not_found = re.compile(r'^\w+.NotFound')