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

service/ec2: Automatically retry EC2 CreateVpnConnection and CreateVpnGateway requests for concurrency errors #8161

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Apr 2, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Previous output from acceptance testing:

--- FAIL: TestAccAWSVpnGateway_basic (5.90s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.foo: 1 error occurred:
        	* aws_vpn_gateway.foo: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnGateway_importBasic (6.14s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.foo: 1 error occurred:
        	* aws_vpn_gateway.foo: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnGateway_tags (5.29s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.foo: 1 error occurred:
        	* aws_vpn_gateway.foo: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnGatewayAttachment_deleted (6.00s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.test: 1 error occurred:
        	* aws_vpn_gateway.test: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVPNGatewayRoutePropagation_basic (6.64s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.foo: 1 error occurred:
        	* aws_vpn_gateway.foo: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnConnection_basic (14.67s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_connection.foo: 1 error occurred:
        	* aws_vpn_connection.foo: Error creating vpn connection: VpnConnectionLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnConnection_disappears (14.49s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.vpn_gateway: 1 error occurred:
        	* aws_vpn_gateway.vpn_gateway: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnConnection_tunnelOptions (15.47s)
    testing.go:538: Step 14 error: Error applying: 1 error occurred:
        	* aws_vpn_connection.foo: 1 error occurred:
        	* aws_vpn_connection.foo: Error creating vpn connection: VpnConnectionLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnConnection_withoutStaticRoutes (14.51s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_connection.foo: 1 error occurred:
        	* aws_vpn_connection.foo: Error creating vpn connection: VpnConnectionLimitExceeded: The maximum number of mutating objects has been reached.

With this new handling added, we can see successful retrying of the requests after this error in the debug logging, e.g.

2019/04/02 16:53:39 [DEBUG] [aws-sdk-go] DEBUG: Retrying Request ec2/CreateVpnGateway, attempt 1

Output from acceptance testing:

# Concurrently
--- PASS: TestAccAWSVpnGateway_disappears (70.16s)
--- PASS: TestAccAWSVpnGatewayAttachment_basic (71.99s)
--- PASS: TestAccAWSVpnGatewayAttachment_deleted (82.35s)
--- PASS: TestAccAWSVpnGateway_delete (88.05s)
--- PASS: TestAccAWSVpnGateway_importBasic (88.90s)
--- PASS: TestAccAWSVPNGatewayRoutePropagation_basic (90.45s)
--- PASS: TestAccAWSVpnGateway_tags (94.23s)
--- PASS: TestAccAWSVpnGateway_withAmazonSideAsnSetToState (111.57s)
--- PASS: TestAccAWSVpnGateway_withAvailabilityZoneSetToState (111.61s)
--- PASS: TestAccAWSVpnGateway_basic (149.61s)
--- PASS: TestAccAWSVpnGateway_reattach (177.15s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	178.133s

# Concurrently
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (192.33s)
--- PASS: TestAccAWSVpnConnection_importBasic (212.25s)
--- PASS: TestAccAWSVpnConnectionRoute_basic (254.94s)
--- PASS: TestAccAWSVpnConnection_disappears (279.78s)
--- PASS: TestAccAWSVpnConnection_basic (504.96s)
--- PASS: TestAccAWSVpnConnection_TransitGatewayID (575.86s)
--- PASS: TestAccAWSVpnConnection_tunnelOptions (582.15s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	583.190s

…nGateway requests for concurrency errors

Previous output from acceptance testing:

```
--- FAIL: TestAccAWSVpnGateway_basic (5.90s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.foo: 1 error occurred:
        	* aws_vpn_gateway.foo: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnGateway_importBasic (6.14s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.foo: 1 error occurred:
        	* aws_vpn_gateway.foo: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnGateway_tags (5.29s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.foo: 1 error occurred:
        	* aws_vpn_gateway.foo: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnGatewayAttachment_deleted (6.00s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.test: 1 error occurred:
        	* aws_vpn_gateway.test: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVPNGatewayRoutePropagation_basic (6.64s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.foo: 1 error occurred:
        	* aws_vpn_gateway.foo: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnConnection_basic (14.67s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_connection.foo: 1 error occurred:
        	* aws_vpn_connection.foo: Error creating vpn connection: VpnConnectionLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnConnection_disappears (14.49s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_gateway.vpn_gateway: 1 error occurred:
        	* aws_vpn_gateway.vpn_gateway: Error creating VPN gateway: VpnGatewayLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnConnection_tunnelOptions (15.47s)
    testing.go:538: Step 14 error: Error applying: 1 error occurred:
        	* aws_vpn_connection.foo: 1 error occurred:
        	* aws_vpn_connection.foo: Error creating vpn connection: VpnConnectionLimitExceeded: The maximum number of mutating objects has been reached.

--- FAIL: TestAccAWSVpnConnection_withoutStaticRoutes (14.51s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_vpn_connection.foo: 1 error occurred:
        	* aws_vpn_connection.foo: Error creating vpn connection: VpnConnectionLimitExceeded: The maximum number of mutating objects has been reached.
```

With this new handling added, we can see successful retrying of the requests after this error in the debug logging, e.g.

```
2019/04/02 16:53:39 [DEBUG] [aws-sdk-go] DEBUG: Retrying Request ec2/CreateVpnGateway, attempt 1
```

Output from acceptance testing:

```
# Concurrently
--- PASS: TestAccAWSVpnGateway_disappears (70.16s)
--- PASS: TestAccAWSVpnGatewayAttachment_basic (71.99s)
--- PASS: TestAccAWSVpnGatewayAttachment_deleted (82.35s)
--- PASS: TestAccAWSVpnGateway_delete (88.05s)
--- PASS: TestAccAWSVpnGateway_importBasic (88.90s)
--- PASS: TestAccAWSVPNGatewayRoutePropagation_basic (90.45s)
--- PASS: TestAccAWSVpnGateway_tags (94.23s)
--- PASS: TestAccAWSVpnGateway_withAmazonSideAsnSetToState (111.57s)
--- PASS: TestAccAWSVpnGateway_withAvailabilityZoneSetToState (111.61s)
--- PASS: TestAccAWSVpnGateway_basic (149.61s)
--- PASS: TestAccAWSVpnGateway_reattach (177.15s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	178.133s

# Concurrently
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (192.33s)
--- PASS: TestAccAWSVpnConnection_importBasic (212.25s)
--- PASS: TestAccAWSVpnConnectionRoute_basic (254.94s)
--- PASS: TestAccAWSVpnConnection_disappears (279.78s)
--- PASS: TestAccAWSVpnConnection_basic (504.96s)
--- PASS: TestAccAWSVpnConnection_TransitGatewayID (575.86s)
--- PASS: TestAccAWSVpnConnection_tunnelOptions (582.15s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	583.190s
```
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. labels Apr 2, 2019
@bflad bflad requested a review from a team April 2, 2019 21:09
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. labels Apr 2, 2019
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@bflad bflad added this to the v2.5.0 milestone Apr 5, 2019
@bflad bflad merged commit a2d5d0d into master Apr 5, 2019
@bflad bflad deleted the t-ec2conn-mutating-objects branch April 5, 2019 04:15
bflad added a commit that referenced this pull request Apr 5, 2019
@bflad
Copy link
Contributor Author

bflad commented Apr 5, 2019

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

@ghost
Copy link

ghost commented Mar 30, 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 Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants