Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some code paths in ec2_instance are not using AWSRetry #927

Closed
1 task done
briantist opened this issue Jul 14, 2022 · 2 comments · Fixed by #928
Closed
1 task done

Some code paths in ec2_instance are not using AWSRetry #927

briantist opened this issue Jul 14, 2022 · 2 comments · Fixed by #928
Labels
bug This issue/PR relates to a bug module module needs_triage plugins plugin (any type) python3

Comments

@briantist
Copy link
Contributor

Summary

Example from @tremble :
https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/ec2_instance.py#L1937

I'm hitting certain issues where it seems that some retries are being performed but it's not doing the 10 retries that the collection defaults to and instead is failing after 4.

Failed to create new EC2 instance: An error occurred (RequestLimitExceeded) when calling the RunInstances operation (reached max retries: 4): Request limit exceeded.

Issue Type

Bug Report

Component Name

ec2_instance

Ansible Version

$ ansible --version
ansible [core 2.13.1]
  config file = None
  python version = 3.8.0 (default, Feb 25 2021, 22:10:10) [GCC 8.4.0]
  jinja version = 3.1.2
  libyaml = True

Collection Versions

$ ansible-galaxy collection list
Collection            Version
--------------------- -------
ansible.posix         1.2.0
ansible.windows       1.10.0
briantist.whatever    0.1.0
community.crypto      1.7.1
community.docker      2.6.0
community.general     3.0.0
community.hashi_vault 3.0.0
community.windows     1.10.0
jborean93.psrp        0.1.0

AWS SDK versions

$ pip show boto boto3 botocore
Name: boto3
Version: 1.24.29
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email:
License: Apache License 2.0
Location: /home/briantist/.a213/lib/python3.8/site-packages
Requires: botocore, jmespath, s3transfer
Required-by:
---
Name: botocore
Version: 1.27.29
Summary: Low-level, data-driven core of boto 3.
Home-page: https://github.com/boto/botocore
Author: Amazon Web Services
Author-email:
License: Apache License 2.0
Location: /home/briantist/.a213/lib/python3.8/site-packages
Requires: jmespath, python-dateutil, urllib3
Required-by: boto3, s3transfer

Configuration

$ ansible-config dump --only-changed
CALLBACKS_ENABLED(env: ANSIBLE_CALLBACKS_ENABLED) = ['profile_tasks']
DEFAULT_FORKS(env: ANSIBLE_FORKS) = 30
INVENTORY_ENABLED(env: ANSIBLE_INVENTORY_ENABLED) = ['host_list', 'auto', 'ini', 'yaml', 'toml']

OS / Environment

Ubuntu 18.04 (WSL2)

Steps to Reproduce

N/A

Expected Results

Succeeds after more time, or fails after a much longer retry/backoff period

Actual Results

Failed to create new EC2 instance: An error occurred (RequestLimitExceeded) when calling the RunInstances operation (reached max retries: 4): Request limit exceeded.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module needs_triage plugins plugin (any type) python3 labels Jul 14, 2022
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jul 15, 2022
ec2_instance - expand use of AWSRetry

SUMMARY
fixes: #927
A few code paths weren't using AWSRetry when the should have, probably a leftover from when retries included the NotFound exceptions.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_instance
ADDITIONAL INFORMATION

Reviewed-by: Brian Scholer <None>
Reviewed-by: Alina Buzachis <None>
patchback bot pushed a commit that referenced this issue Jul 15, 2022
ec2_instance - expand use of AWSRetry

SUMMARY
fixes: #927
A few code paths weren't using AWSRetry when the should have, probably a leftover from when retries included the NotFound exceptions.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_instance
ADDITIONAL INFORMATION

Reviewed-by: Brian Scholer <None>
Reviewed-by: Alina Buzachis <None>
(cherry picked from commit 524129f)
patchback bot pushed a commit that referenced this issue Jul 15, 2022
ec2_instance - expand use of AWSRetry

SUMMARY
fixes: #927
A few code paths weren't using AWSRetry when the should have, probably a leftover from when retries included the NotFound exceptions.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_instance
ADDITIONAL INFORMATION

Reviewed-by: Brian Scholer <None>
Reviewed-by: Alina Buzachis <None>
(cherry picked from commit 524129f)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jul 15, 2022
[PR #928/524129fc backport][stable-4] ec2_instance - expand use of AWSRetry

This is a backport of PR #928 as merged into main (524129f).
SUMMARY
fixes: #927
A few code paths weren't using AWSRetry when the should have, probably a leftover from when retries included the NotFound exceptions.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_instance
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jul 18, 2022
[PR #928/524129fc backport][stable-3] ec2_instance - expand use of AWSRetry

This is a backport of PR #928 as merged into main (524129f).
SUMMARY
fixes: #927
A few code paths weren't using AWSRetry when the should have, probably a leftover from when retries included the NotFound exceptions.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_instance
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module needs_triage plugins plugin (any type) python3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants