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

resource/aws_datasync_task: Allow UNAVAILABLE as pending status during creation #15949

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Oct 31, 2020

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 #15947

Release note for CHANGELOG:

* resource/aws_datasync_task: Allow `UNAVAILABLE` as pending status during creation

Especially for new EFS Mount Targets, the task can temporarily transition from CREATING to UNAVAILABLE (mount failures) then eventually it can transition to AVAILABLE. This also simplifies and updates the base testing configuration based on the current DataSync user guide.

Previously:

=== CONT  TestAccAWSDataSyncTask_basic
TestAccAWSDataSyncTask_basic: resource_aws_datasync_task_test.go:85: Step 1/2 error: Error running apply:
Error: error waiting for DataSync Task (arn:aws:datasync:us-west-2:*******:task/task-0e819038fac1ebf6e) creation: waiting for DataSync Task (arn:aws:datasync:us-west-2:*******:task/task-0e819038fac1ebf6e) creation: last status (UNAVAILABLE), error code (MountFailure), error detail: Failed to connect to an NFS server on host fs-7c85ce79.efs.us-west-2.amazonaws.com. Ensure that your DataSync agent has a route to your NFS server and can make a TCP connection to port 2049. Please also ensure that the NFS service is running and listening on port 2049. After resolving any networking issues, retry your task.
--- FAIL: TestAccAWSDataSyncTask_basic (252.60s)

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSDataSyncTask_basic (229.43s)
--- PASS: TestAccAWSDataSyncTask_CloudWatchLogGroupARN (227.57s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_AtimeMtime (348.45s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_BytesPerSecond (266.03s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Gid (240.71s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PosixPermissions (287.10s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDeletedFiles (240.21s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDevices (349.08s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Uid (365.25s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_VerifyMode (356.74s)
--- PASS: TestAccAWSDataSyncTask_disappears (227.63s)

Output from acceptance testing in AWS GovCloud (US):

--- PASS: TestAccAWSDataSyncTask_basic (240.55s)
--- PASS: TestAccAWSDataSyncTask_CloudWatchLogGroupARN (272.05s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_AtimeMtime (276.25s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_BytesPerSecond (289.87s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Gid (301.43s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PosixPermissions (286.56s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDeletedFiles (299.53s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDevices (300.01s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Uid (312.04s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_VerifyMode (344.80s)
--- PASS: TestAccAWSDataSyncTask_disappears (246.44s)

@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. technical-debt Addresses areas of the codebase that need refactoring or redesign. service/datasync Issues and PRs that pertain to the datasync service. labels Oct 31, 2020
@bflad bflad requested a review from a team October 31, 2020 01:21
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Oct 31, 2020
…g creation

Reference: #15947

Especially for new EFS Mount Targets, the task can temporarily transition from CREATING to UNAVAILABLE (mount failures) then eventually it can transition to AVAILABLE. This also simplifies and updates the base testing configuration based on the current DataSync user guide.

Previously:

```
=== CONT  TestAccAWSDataSyncTask_basic
TestAccAWSDataSyncTask_basic: resource_aws_datasync_task_test.go:85: Step 1/2 error: Error running apply:
Error: error waiting for DataSync Task (arn:aws:datasync:us-west-2:*******:task/task-0e819038fac1ebf6e) creation: waiting for DataSync Task (arn:aws:datasync:us-west-2:*******:task/task-0e819038fac1ebf6e) creation: last status (UNAVAILABLE), error code (MountFailure), error detail: Failed to connect to an NFS server on host fs-7c85ce79.efs.us-west-2.amazonaws.com. Ensure that your DataSync agent has a route to your NFS server and can make a TCP connection to port 2049. Please also ensure that the NFS service is running and listening on port 2049. After resolving any networking issues, retry your task.
--- FAIL: TestAccAWSDataSyncTask_basic (252.60s)
```

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSDataSyncTask_basic (229.43s)
--- PASS: TestAccAWSDataSyncTask_CloudWatchLogGroupARN (227.57s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_AtimeMtime (348.45s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_BytesPerSecond (266.03s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Gid (240.71s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PosixPermissions (287.10s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDeletedFiles (240.21s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDevices (349.08s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Uid (365.25s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_VerifyMode (356.74s)
--- PASS: TestAccAWSDataSyncTask_disappears (227.63s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAWSDataSyncTask_basic (240.55s)
--- PASS: TestAccAWSDataSyncTask_CloudWatchLogGroupARN (272.05s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_AtimeMtime (276.25s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_BytesPerSecond (289.87s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Gid (301.43s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PosixPermissions (286.56s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDeletedFiles (299.53s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDevices (300.01s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Uid (312.04s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_VerifyMode (344.80s)
--- PASS: TestAccAWSDataSyncTask_disappears (246.44s)
```
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

Excellent! 💯

GovCloud:

--- PASS: TestAccAWSDataSyncTask_CloudWatchLogGroupARN (226.56s)
--- PASS: TestAccAWSDataSyncTask_basic (242.73s)
--- PASS: TestAccAWSDataSyncTask_disappears (246.49s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PosixPermissions (282.88s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDevices (289.45s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Uid (293.89s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_BytesPerSecond (295.81s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDeletedFiles (304.18s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_VerifyMode (326.30s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_AtimeMtime (332.50s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Gid (338.98s)

Commercial:

--- PASS: TestAccAWSDataSyncTask_CloudWatchLogGroupARN (214.39s)
--- PASS: TestAccAWSDataSyncTask_disappears (237.83s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_AtimeMtime (262.28s)
--- PASS: TestAccAWSDataSyncTask_basic (278.96s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDevices (284.82s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Uid (294.30s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_Gid (301.17s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PreserveDeletedFiles (304.21s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_VerifyMode (310.87s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_BytesPerSecond (319.39s)
--- PASS: TestAccAWSDataSyncTask_DefaultSyncOptions_PosixPermissions (329.10s)

@bflad bflad added this to the v3.14.0 milestone Nov 5, 2020
@bflad bflad merged commit 6be55d7 into master Nov 5, 2020
@bflad bflad deleted the t-aws_datasync_task-creation-failures branch November 5, 2020 23:51
bflad added a commit that referenced this pull request Nov 5, 2020
@ghost
Copy link

ghost commented Nov 6, 2020

This has been released in version 3.14.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 Dec 6, 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 as resolved and limited conversation to collaborators Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/datasync Issues and PRs that pertain to the datasync service. size/L Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. 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.

tests/resource/aws_datasync_task: Regular EFS DNS failures
2 participants