Skip to content

Commit

Permalink
ec2_instance retry on InsuffienctInstanceCapacity (#1039) (#1040)
Browse files Browse the repository at this point in the history
[PR #1039/0374961a backport][stable-4] `ec2_instance` retry on `InsuffienctInstanceCapacity `

This is a backport of PR #1039 as merged into main (0374961).
SUMMARY

Closes #1038
Expands the use of the AWSRetry decorator to include InsuffienctInstanceCapacity errors.

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ec2_instance

Reviewed-by: Jill R <None>
  • Loading branch information
patchback[bot] authored Sep 22, 2022
1 parent 46425d0 commit c848983
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/1038-ec2-insufficient-capacity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- ec2_instance - expanded the use of the automatic retries to ``InsuffienctInstanceCapacity`` (https://github.com/ansible-collections/amazon.aws/issues/1038).
1 change: 1 addition & 0 deletions plugins/modules/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,7 @@ def main():
retry_decorator = AWSRetry.jittered_backoff(
catch_extra_error_codes=[
'IncorrectState',
'InsuffienctInstanceCapacity',
]
)
client = module.client('ec2', retry_decorator=retry_decorator)
Expand Down

0 comments on commit c848983

Please sign in to comment.