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

New Resource - azurerm_hpc_cache_blob_nfs_target #11671

Merged
merged 10 commits into from
Jun 24, 2021

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented May 12, 2021

This PR implements a new HPC resource: azurerm_hpc_cache_blob_nfs_target. Note that due to the level of NFS support of storage account, the test can be only passed in limited regions (incl. west europe, eastus, etc.).

Test Result

terraform-provider-azurerm on  hpc_blobnfs_target via 🐹 v1.16.2
💢 TF_ACC=1 go test -parallel 2 -v -timeout=8h ./azurerm/internal/services/hpccache -run="TestAccHPCCacheBlobNFSTarget_update"
2021/05/12 11:13:55 [DEBUG] not using binary driver name, it's no longer needed
2021/05/12 11:13:55 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccHPCCacheBlobNFSTarget_update
=== PAUSE TestAccHPCCacheBlobNFSTarget_update
=== CONT  TestAccHPCCacheBlobNFSTarget_update
--- PASS: TestAccHPCCacheBlobNFSTarget_update (1912.01s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hpccache    1912.138s

terraform-provider-azurerm on  hpc_blobnfs_target via 🐹 v1.16.2 took 31m58s
💤 TF_ACC=1 go test -parallel 2 -v -timeout=8h ./azurerm/internal/services/hpccache -run="TestAccHPCCacheBlobNFSTarget_accessPolicy"
2021/05/12 12:52:52 [DEBUG] not using binary driver name, it's no longer needed
2021/05/12 12:52:52 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccHPCCacheBlobNFSTarget_accessPolicy
=== PAUSE TestAccHPCCacheBlobNFSTarget_accessPolicy
=== CONT  TestAccHPCCacheBlobNFSTarget_accessPolicy
--- PASS: TestAccHPCCacheBlobNFSTarget_accessPolicy (2852.94s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hpccache    2853.118s

terraform-provider-azurerm on  hpc_blobnfs_target via 🐹 v1.16.2 took 47m40s
💤 TF_ACC=1 go test -parallel 2 -v -timeout=8h ./azurerm/internal/services/hpccache -run="TestAccHPCCacheBlobNFSTarget_basic"
2021/05/12 14:00:15 [DEBUG] not using binary driver name, it's no longer needed
2021/05/12 14:00:15 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccHPCCacheBlobNFSTarget_basic
=== PAUSE TestAccHPCCacheBlobNFSTarget_basic
=== CONT  TestAccHPCCacheBlobNFSTarget_basic
--- PASS: TestAccHPCCacheBlobNFSTarget_basic (2184.23s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hpccache    2184.385s

terraform-provider-azurerm on  hpc_blobnfs_target via 🐹 v1.16.2 took 36m31s
💤 TF_ACC=1 go test -parallel 2 -v -timeout=8h ./azurerm/internal/services/hpccache -run="TestAccHPCCacheBlobNFSTarget_requiresImport"
2021/05/12 14:36:53 [DEBUG] not using binary driver name, it's no longer needed
2021/05/12 14:36:53 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccHPCCacheBlobNFSTarget_requiresImport
=== PAUSE TestAccHPCCacheBlobNFSTarget_requiresImport
=== CONT  TestAccHPCCacheBlobNFSTarget_requiresImport
--- PASS: TestAccHPCCacheBlobNFSTarget_requiresImport (1968.57s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hpccache    1968.726s

@ghost ghost added the size/XL label May 12, 2021
@magodo magodo marked this pull request as draft May 12, 2021 07:30
@magodo magodo changed the title New Resource - azurerm_hpc_blob_nfs_target New Resource - azurerm_hpc_cache_blob_nfs_target May 12, 2021
@ghost ghost added the documentation label May 12, 2021
@magodo magodo marked this pull request as ready for review May 12, 2021 07:52
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @magodo - overall this looks good aside from a couple comments. running the tests i'm seeing failures thou:

------- Stdout: -------
=== RUN   TestAccHPCCacheBlobNFSTarget_accessPolicy
=== PAUSE TestAccHPCCacheBlobNFSTarget_accessPolicy
=== CONT  TestAccHPCCacheBlobNFSTarget_accessPolicy
    testing.go:620: Step 1/8 error: Error running apply: exit status 1
        
        Error: Error waiting for HPC Cache "acctest-HPCC-210519233234713607" (Resource Group "acctestRG-storage-210519233234713607") to finish provisioning: Code="CreateResourceTimeout" Message="Timed out creating Azure resources.   Please delete the cache and try again."
        
          with azurerm_hpc_cache.test,
          on terraform_plugin_test.tf line 134, in resource "azurerm_hpc_cache" "test":
         134: resource "azurerm_hpc_cache" "test" {
        
    testing_new.go:21: WARNING: destroy failed, so remote objects may still exist and be subject to billing
    testing_new.go:21: failed to destroy: exit status 1
        
        Error: deleting Subnet: (Name "acctestsub-210519233234713607" / Virtual Network Name "acctest-VN-210519233234713607" / Resource Group "acctestRG-storage-210519233234713607"): network.SubnetsClient#Delete: Failure sending request: StatusCode=0 -- Original Error: Code="InUseSubnetCannotBeDeleted" Message="Subnet acctestsub-210519233234713607 is in use by /subscriptions/*******/resourceGroups/ACCTESTRG-STORAGE-210519233234713607/providers/Microsoft.Network/networkInterfaces/prod-8ab244be-172b-4ee1-84ad-ca72a7c1562e-cluster-nic-0/ipConfigurations/primary and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet." Details=[]
        
   ------- Stdout: -------
=== RUN   TestAccHPCCacheBlobNFSTarget_basic
=== PAUSE TestAccHPCCacheBlobNFSTarget_basic
=== CONT  TestAccHPCCacheBlobNFSTarget_basic
    testing.go:620: Step 1/2 error: Error running apply: exit status 1
        
        Error: Error waiting for Storage Target: (Name "acctest-HPCCTGT-puzqr" / Cache Name "acctest-HPCC-210519233234668059" / Resource Group "acctestRG-storage-210519233234668059"): Code="AscInternalError" Message="Error encountered deploying the storage target: 'acctest-HPCCTGT-puzqr'."
        
          with azurerm_hpc_cache_blob_nfs_target.test,
          on terraform_plugin_test.tf line 144, in resource "azurerm_hpc_cache_blob_nfs_target" "test":
         144: resource "azurerm_hpc_cache_blob_nfs_target" "test" {
        
--- FAIL: TestAccHPCCacheBlobNFSTarget_basic (1360.13s)
FAIL

------- Stderr: -------
2021/05/19 23:32:34 [DEBUG] not using binary driver name, it's no longer needed
2021/05/19 23:32:34 [DEBUG] not using binary driver name, it's no longer needed

------- Stdout: -------
=== RUN   TestAccHPCCacheBlobNFSTarget_requiresImport
=== PAUSE TestAccHPCCacheBlobNFSTarget_requiresImport
=== CONT  TestAccHPCCacheBlobNFSTarget_requiresImport
    testing.go:620: Step 1/2 error: Error running apply: exit status 1
        
        Error: Error creating Storage Target: (Name "acctest-HPCCTGT-rhfbg" / Cache Name "acctest-HPCC-210519235513184265" / Resource Group "acctestRG-storage-210519235513184265"): storagecache.StorageTargetsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidParameter" Message="Target storage account or container does not exist or hasn't sufficient permissions." Target="storageTarget.blobNfs.target"
        
          with azurerm_hpc_cache_blob_nfs_target.test,
          on terraform_plugin_test.tf line 144, in resource "azurerm_hpc_cache_blob_nfs_target" "test":
         144: resource "azurerm_hpc_cache_blob_nfs_target" "test" {
        
--- FAIL: TestAccHPCCacheBlobNFSTarget_requiresImport (1353.34s)
FAIL

------- Stderr: -------
2021/05/19 23:55:12 [DEBUG] not using binary driver name, it's no longer needed
2021/05/19 23:55:13 [DEBUG] not using binary driver name, it's no longer needed

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

still have a test failure:

------- Stdout: -------
=== RUN   TestAccHPCCacheBlobNFSTarget_requiresImport
=== PAUSE TestAccHPCCacheBlobNFSTarget_requiresImport
=== CONT  TestAccHPCCacheBlobNFSTarget_requiresImport
    testing.go:620: Step 1/2 error: Error running apply: exit status 1
        
        Error: Error waiting for Storage Target: (Name "acctest-HPCCTGT-7gtxo" / Cache Name "acctest-HPCC-210601181157052404" / Resource Group "acctestRG-storage-210601181157052404"): Code="InternalExecutionError" Message="An internal execution error occurred."
        
          with azurerm_hpc_cache_blob_nfs_target.test,
          on terraform_plugin_test.tf line 115, in resource "azurerm_hpc_cache_blob_nfs_target" "test":
         115: resource "azurerm_hpc_cache_blob_nfs_target" "test" {
        
--- FAIL: TestAccHPCCacheBlobNFSTarget_requiresImport (1740.02s)
FAIL

------- Stderr: -------
2021/06/01 18:11:56 [DEBUG] not using binary driver name, it's no longer needed
2021/06/01 18:11:56 [DEBUG] not using binary driver name, it's no longer needed

@magodo
Copy link
Collaborator Author

magodo commented Jun 2, 2021

@katbyte I'm still discussing with the service team for this kind of random failures. I'm wondering whether we can merge this PR with these intermittent issue existing, since these are issues on service side.

@katbyte
Copy link
Collaborator

katbyte commented Jun 10, 2021

@magodo i've not been able to get a clean run in TC and it seems this is a constant failure now:

------- Stdout: -------
=== RUN   TestAccHPCCacheBlobNFSTarget_requiresImport
=== PAUSE TestAccHPCCacheBlobNFSTarget_requiresImport
=== CONT  TestAccHPCCacheBlobNFSTarget_requiresImport
    testing.go:620: Step 1/2 error: Error running apply: exit status 1
        
        Error: Error creating Storage Target: (Name "acctest-HPCCTGT-w0gd3" / Cache Name "acctest-HPCC-210603165047909801" / Resource Group "acctestRG-storage-210603165047909801"): storagecache.StorageTargetsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidParameter" Message="Target storage account or container does not exist or hasn't sufficient permissions." Target="storageTarget.blobNfs.target"
        
          with azurerm_hpc_cache_blob_nfs_target.test,
          on terraform_plugin_test.tf line 115, in resource "azurerm_hpc_cache_blob_nfs_target" "test":
         115: resource "azurerm_hpc_cache_blob_nfs_target" "test" {
        
--- FAIL: TestAccHPCCacheBlobNFSTarget_requiresImport (1347.75s)
FAIL

------- Stderr: -------
2021/06/03 16:50:47 [DEBUG] not using binary driver name, it's no longer needed
2021/06/03 16:50:47 [DEBUG] not using binary driver name, it's no longer needed

@magodo
Copy link
Collaborator Author

magodo commented Jun 11, 2021

@katbyte The service team is still looking into these errors.

@katbyte katbyte added this to the v2.65.0 milestone Jun 24, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@katbyte katbyte merged commit 5f1c42b into hashicorp:master Jun 24, 2021
katbyte added a commit that referenced this pull request Jun 24, 2021
@github-actions
Copy link

This functionality has been released in v2.65.0 of the Terraform 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. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants