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

Bump timeout for subnet delete from 10 to 20 mins #6322

Merged
merged 1 commit into from
Jun 4, 2019

Conversation

jen20
Copy link
Contributor

@jen20 jen20 commented Nov 1, 2018

We've seen subnet deletion failures that we think we can trace to ENIs left behind by NLB. We don't have permission to detach or delete those ENIs, so our only recourse is to wait longer.

Both the state change timeout and the overall resource timeout is increased.

$ make testacc TESTARGS='-run=TestAccAWSSubnet'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSSubnet -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSSubnet_importBasic
=== PAUSE TestAccAWSSubnet_importBasic
=== RUN   TestAccAWSSubnet_basic
=== PAUSE TestAccAWSSubnet_basic
=== RUN   TestAccAWSSubnet_ipv6
=== PAUSE TestAccAWSSubnet_ipv6
=== RUN   TestAccAWSSubnet_enableIpv6
=== PAUSE TestAccAWSSubnet_enableIpv6
=== CONT  TestAccAWSSubnet_importBasic
=== CONT  TestAccAWSSubnet_enableIpv6
=== CONT  TestAccAWSSubnet_ipv6
=== CONT  TestAccAWSSubnet_basic
--- PASS: TestAccAWSSubnet_basic (23.14s)
--- PASS: TestAccAWSSubnet_importBasic (23.44s)
--- PASS: TestAccAWSSubnet_enableIpv6 (37.74s)
--- PASS: TestAccAWSSubnet_ipv6 (60.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	60.779s

@jen20 jen20 added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Nov 1, 2018
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Nov 1, 2018
aws/resource_aws_subnet.go Outdated Show resolved Hide resolved
@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Nov 1, 2018
We've seen subnet deletion failures that we think we can trace to ENIs left
behind by NLB. We don't have permission to detach or delete those ENIs, so our
only recourse is to wait longer.

Additionally, we plumb through Create and Delete to use the configured timeouts
via `d.Timeout(schema.Timeout{Create,Delete})` so that custom timeouts will be
reflected. Update is not as straightforward to reason about as there are
separate timeouts for disassociation and association of address spaces, and the
individually configured values do not appear to have presented problems so far.
@jen20 jen20 force-pushed the jen20/subnet-delete-timeout branch from 5da15f8 to dde1073 Compare June 2, 2019 16:50
@jen20 jen20 removed the waiting-response Maintainers are waiting on response from community or contributor. label Jun 2, 2019
@jen20
Copy link
Contributor Author

jen20 commented Jun 2, 2019

Hi @bflad! Sorry for the belated reply here. I've modified this to use d.Timeout() for Create and Delete, and bumped the delete timeout up to 20 minutes also to solve the actual issue here. I've also rebased this pull request on top of the current master branch.

Test output at dde1073:

$ make testacc TESTARGS='-run=TestAccAWSSubnet'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSSubnet -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSSubnet_importBasic
=== PAUSE TestAccAWSSubnet_importBasic
=== RUN   TestAccAWSSubnet_basic
=== PAUSE TestAccAWSSubnet_basic
=== RUN   TestAccAWSSubnet_ipv6
=== PAUSE TestAccAWSSubnet_ipv6
=== RUN   TestAccAWSSubnet_enableIpv6
=== PAUSE TestAccAWSSubnet_enableIpv6
=== RUN   TestAccAWSSubnet_availabilityZoneId
=== PAUSE TestAccAWSSubnet_availabilityZoneId
=== CONT  TestAccAWSSubnet_importBasic
=== CONT  TestAccAWSSubnet_enableIpv6
=== CONT  TestAccAWSSubnet_basic
=== CONT  TestAccAWSSubnet_availabilityZoneId
=== CONT  TestAccAWSSubnet_ipv6
--- PASS: TestAccAWSSubnet_availabilityZoneId (35.66s)
--- PASS: TestAccAWSSubnet_basic (35.90s)
--- PASS: TestAccAWSSubnet_importBasic (38.01s)
--- PASS: TestAccAWSSubnet_enableIpv6 (58.42s)
--- PASS: TestAccAWSSubnet_ipv6 (96.49s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	96.548s

@bflad bflad added this to the v2.14.0 milestone Jun 4, 2019
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.

Thanks so much for the updates, @jen20! Looks good to me.

Output from acceptance testing:

--- PASS: TestAccAWSSubnet_availabilityZoneId (10.47s)
--- PASS: TestAccAWSSubnet_basic (10.93s)
--- PASS: TestAccAWSSubnet_importBasic (11.21s)
--- PASS: TestAccAWSSubnet_enableIpv6 (17.41s)
--- PASS: TestAccAWSSubnet_ipv6 (25.32s)

@bflad bflad merged commit d81d5df into master Jun 4, 2019
@bflad bflad deleted the jen20/subnet-delete-timeout branch June 4, 2019 17:05
bflad added a commit that referenced this pull request Jun 4, 2019
akatrevorjay added a commit to WhistleLabs/terraform-provider-aws that referenced this pull request Jun 6, 2019
* upstream/master: (39 commits)
  Update CHANGELOG for hashicorp#8850
  tests/provider: Add tfproviderlint and enable S001-S005 checks
  service/kafka: Changes for General Availability Release
  chore(deps): update module hashicorp/terraform to v0.12.1
  deps: github.com/golangci/golangci-lint/cmd/golangci-lint@de1d1ad903cd
  Update CHANGELOG.md
  Update CHANGELOG for hashicorp#6322
  Retry timeout error for acmpca cert authority
  Add nil check for S3 bucket metric filter
  Update cloudwatch_event_target.html.markdown
  Update module aws/aws-sdk-go to v1.19.42
  Add a nil check for reading spot options
  Update waf_sql_injection_match_set.html.markdown
  Document the aws_ssm_activation "id" attribute
  aws_subnet: Increase timeout for delete to 20 mins
  Secure basic CloudTrail example
  docs/resource/aws_route53_record: Add NS and SOA Record Management example
  Update default example to use json instead of form
  tests/service/waf: Add PreCheck for service availability
  tests/service/transfer: Add PreCheck for service availability
  ...
@bflad
Copy link
Contributor

bflad commented Jun 7, 2019

This has been released in version 2.14.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 Nov 3, 2019

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 Nov 3, 2019
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.

2 participants