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

aws_route: Retry if route not found after creating it #13747

Merged
merged 2 commits into from
Jun 15, 2020

Conversation

alewando
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #13138

Release note for CHANGELOG:

When creating route, retry until route is visible (respecting configured timeout)

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@alewando alewando requested a review from a team June 14, 2020 03:35
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. needs-triage Waiting for first response or review from a maintainer. labels Jun 14, 2020
@alewando
Copy link
Contributor Author

When resourceAwsRouteFindRoute() returns a nil value (ie: route not found), it was being wrapped as a resource.RetryableError(nil) value. The lack of an non-nil err value inside RetryableError was causing the Retry logic to treat at is if it were and immediate timeout, and not executing any retries.
This pull request puts an actual error inside RetryableError, thus triggering the expected retries.

@ewbankkit
Copy link
Contributor

@alewando Thanks for the contribution.
Could you please make the same change to the destination_ipv6_cidr_block block?
Relates: #13409.

@alewando
Copy link
Contributor Author

Thanks for identifying that, @ewbankkit! The PR was updated to also implement the fix for destination_ipv6_cidr_block.

@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 15, 2020
@bflad bflad added this to the v2.67.0 milestone Jun 15, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this fix, @alewando 🚀

Output from acceptance testing:

--- PASS: TestAccAWSRoute_basic (56.69s)
--- PASS: TestAccAWSRoute_changeCidr (43.84s)
--- PASS: TestAccAWSRoute_changeRouteTable (48.75s)
--- PASS: TestAccAWSRoute_disappears (29.82s)
--- PASS: TestAccAWSRoute_doesNotCrashWithVPCEndpoint (40.48s)
--- PASS: TestAccAWSRoute_ipv6Support (41.10s)
--- PASS: TestAccAWSRoute_ipv6ToInstance (101.37s)
--- PASS: TestAccAWSRoute_ipv6ToInternetGateway (35.51s)
--- PASS: TestAccAWSRoute_ipv6ToNetworkInterface (122.20s)
--- PASS: TestAccAWSRoute_ipv6ToPeeringConnection (38.36s)
--- PASS: TestAccAWSRoute_noopdiff (72.92s)
--- PASS: TestAccAWSRoute_TransitGatewayID_DestinationCidrBlock (259.74s)

@bflad bflad merged commit e6b9a4c into hashicorp:master Jun 15, 2020
bflad added a commit that referenced this pull request Jun 15, 2020
@ghost
Copy link

ghost commented Jun 19, 2020

This has been released in version 2.67.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Jul 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to find matching route for Route Table (rtb-xxxxx) and destination CIDR block (x.x.x.x/x)
3 participants