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

Fix #7376 - azurerm_storage_data_lake_gen2_filesystem crashes during plan if SA deleted #7378

Merged

Conversation

storey247
Copy link
Contributor

added fix to check storage account exists before attempting to read the filesystem
added test
changed filesystem acc tests to use hns

This PR address the issue #7376

added test
changed test to use hns
@ghost ghost added the size/M label Jun 17, 2020
Copy link
Contributor

@ArcturusZhang ArcturusZhang left a comment

Choose a reason for hiding this comment

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

Hi @storey247 thanks for this PR!

While this PR looks great to me, I have a question about this. Based on the details you posted in #7376 , the error message is a context deadline exceeded.

Could I understand these two resources like that you have a resource group and another resource inside it, and then you delete the resource group in some other approach? In short words, on portal, if we delete storage account, would the file system be deleted along with it? If so, this makes this issue smell more like an issue with the service itself rather than we should do something in the provider.

@storey247
Copy link
Contributor Author

storey247 commented Jun 18, 2020

@ArcturusZhang this is an excellent point, and when I first started investigating the issue and working on a fix, I was looking at fixing in the giovanni client that gets used. However, looking at the logic there, it seemed that there was a deliberate separation between the concerns of retrieving storage account properties and retrieving filesystem properties.

I therefore took the decision that to fix the issue it was probably best to take the approach in this PR, use the SA client to check if the storage account exists before using the filesystem client to retrieve the filesystem properties.

@stuartleeks
Copy link
Contributor

Hi @ArcturusZhang - if I've understood correctly, I think you are suggesting that context deadline exceeded isn't the most helpful response when getting properties for a filesystem where the storage account doesn't exist? If so, I completely agree and would love to see a more helpful error response for this scenario. I'm not sure what the timescales for that would be?

@ArcturusZhang
Copy link
Contributor

Hi @storey247 and @stuartleeks My initial though is that this should be a valid work-around rather than a fix, which may hide something wrong behind the curtain. But as a valid work-around, this indeed will fix the corresponding issue. I personally think this should be good to go.

In the meantime, it would be best if we could make a new issue about the error message. The error comes from giovanni the storage data plane SDK, and in giovanni it comes from go-autorest (according to offline discussion with Tom)

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for this @storey247

@katbyte katbyte added this to the v2.18.0 milestone Jul 3, 2020
@katbyte katbyte merged commit 4b17bea into hashicorp:master Jul 3, 2020
katbyte added a commit that referenced this pull request Jul 3, 2020
@ghost
Copy link

ghost commented Jul 10, 2020

This has been released in version 2.18.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.18.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Aug 2, 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. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 2, 2020
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.

5 participants