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

[PR #1026/6a2793af backport][stable-3] Add AWSRetry.jittered_backoff to rds_instance_info #1213

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jun 4, 2022

This is a backport of PR #1026 as merged into main (6a2793a).

SUMMARY

Add AWSRetry.jittered_backoff to the rds_instance_info module.

When calling rds_instance_info we have been seeing API rate limit errors from AWS. When calling this module, it usually runs to about 90-150 times in a minute before we get rate limited.

Using jittered_backoff should significantly decrease the number of times we see API rate limits here.

02:20:36 An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded
02:20:36 fatal: [polaris -> localhost]: FAILED! => {"boto3_version": "1.20.22", "botocore_version": "1.23.22", "changed": false, "error": {"code": "Throttling", "message": "Rate exceeded", "type": "Sender"}, "msg": "Couldn't get instance information: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded", "response_metadata": {"http_headers": {"connection": "close", "content-length": "254", "content-type": "text/xml", "date": "Tue, 15 Mar 2022 09:20:34 GMT", "x-amzn-requestid": "5de8131e-3f59-4b04-af25-5f7083ee09b9"}, "http_status_code": 400, "max_attempts_reached": true, "request_id": "5de8131e-3f59-4b04-af25-5f7083ee09b9", "retry_attempts": 4}}
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • rds_instance_info
ADDITIONAL INFORMATION

Decorated rds_instance_info with AWSRetry.jittered_backoff

Add AWSRetry.jittered_backoff to rds_instance_info

SUMMARY
Add AWSRetry.jittered_backoff to the rds_instance_info module.
When calling rds_instance_info we have been seeing API rate limit errors from AWS. When calling this module, it usually runs to about 90-150 times in a minute before we get rate limited.
Using jittered_backoff should significantly decrease the number of times we see API rate limits here.
02:20:36 An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded
02:20:36 fatal: [polaris -> localhost]: FAILED! => {"boto3_version": "1.20.22", "botocore_version": "1.23.22", "changed": false, "error": {"code": "Throttling", "message": "Rate exceeded", "type": "Sender"}, "msg": "Couldn't get instance information: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded", "response_metadata": {"http_headers": {"connection": "close", "content-length": "254", "content-type": "text/xml", "date": "Tue, 15 Mar 2022 09:20:34 GMT", "x-amzn-requestid": "5de8131e-3f59-4b04-af25-5f7083ee09b9"}, "http_status_code": 400, "max_attempts_reached": true, "request_id": "5de8131e-3f59-4b04-af25-5f7083ee09b9", "retry_attempts": 4}}

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

rds_instance_info

ADDITIONAL INFORMATION
Decorated rds_instance_info with AWSRetry.jittered_backoff

Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Mark Chappell <None>
(cherry picked from commit 6a2793a)
@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) traceback labels Jun 4, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

ansible-galaxy-importer FAILURE in 4m 26s (non-voting)
✔️ build-ansible-collection SUCCESS in 4m 40s
✔️ ansible-test-sanity-docker-devel SUCCESS in 11m 27s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 43s
✔️ ansible-test-sanity-docker-stable-2.9 SUCCESS in 11m 05s
✔️ ansible-test-sanity-docker-stable-2.11 SUCCESS in 9m 14s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 16s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 6m 03s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 6m 07s
✔️ ansible-test-splitter SUCCESS in 2m 24s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@markuman markuman added the mergeit Merge the PR (SoftwareFactory) label Jun 4, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

ansible-galaxy-importer FAILURE in 3m 58s (non-voting)
✔️ build-ansible-collection SUCCESS in 5m 26s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 12s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 48s
✔️ ansible-test-sanity-docker-stable-2.9 SUCCESS in 12m 58s
✔️ ansible-test-sanity-docker-stable-2.11 SUCCESS in 11m 00s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 04s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 5m 53s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 6m 42s
✔️ ansible-test-splitter SUCCESS in 2m 26s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit c444062 into stable-3 Jun 4, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-3/6a2793af5895c9ca7196de0eb42ffedea2a453ba/pr-1026 branch June 4, 2022 09:42
abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
…o cidr_ip and cidr_ipv6 (ansible-collections#1213)

ec2_security_group - Deprecate automatic flattening of lists passed to cidr_ip and cidr_ipv6

SUMMARY
ec2_security_group currently has its own "flatten" implementation built into the evaluation of cidr_ip and cidr_ipv6, which allows folks to do things like:
  - ec2_security_group:
      name: '{{ ec2_group_name }}'
      description: '{{ ec2_group_description }}'
      state: present
      rules:
      - proto: "tcp"
        from_port: 8182
        to_port: 8182
        cidr_ipv6:
          - "64:ff9b::/96"
          - ["2620::/32"]
      - proto: "tcp"
        ports: 5665
        cidr_ip:
          - 172.16.1.0/24
          - 172.16.17.0/24
          - ["10.0.0.0/24", "10.20.0.0/24"]

Support for this was originally added prior to the addition of the flatten filter in Ansible 2.5.  Behaviour like this isn't consistent with our other modules and adds additional complexity to an already very complex module.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ec2_security_group
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
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 community_review mergeit Merge the PR (SoftwareFactory) module module new_contributor Help guide this first time contributor plugins plugin (any type) traceback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants