Skip to content

Commit

Permalink
[cloud] re-raise boto ClientError if throttling timeout is reached in…
Browse files Browse the repository at this point in the history
… efs.py (ansible#23109)

* re-raise exception as expected

The current ThrottlingException handling code hides other actual exceptions from the user, and basically goes infinite loop instead. eg when the api caller doesn't have permission (example below) to use the api, ansible effectively hangs. adding the re-raise stops execution and shows the error to the command line as expected

can test by removing permission to the efs api, and calling the efs: module

The error was: botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the DescribeFileSystems operation: User: <x> is not authorized to perform: elasticfilesystem:DescribeFileSystems on the specified resource

* PEP8 fix
  • Loading branch information
bentaylornz authored and ryansb committed Apr 4, 2017
1 parent bded5ac commit 95c1b07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/amazon/efs.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ def iterate_all(attr, map_method, **kwargs):
sleep(wait)
wait = wait * 2
continue
else:
raise


def targets_equal(keys, a, b):
"""
Expand Down

0 comments on commit 95c1b07

Please sign in to comment.