-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_postgresql_database.testdb: Code="InternalServerError" while destroying #4447
Comments
hi @svangeti Thanks for opening this issue. Taking a look into this unfortunately this is a temporary error being returned by Azure - the Azure Provider automatically retries certain status codes (such as Internal Server Error) to work around bugs in the API; which means that for this to be raised this status code must have been returned repeatedly. Where we receive Internal Server Errors there's not much we can do but repeatedly retry the request (as we're doing) and then eventually give up (which we're doing after several attempts) - as such in this case I don't believe there's much more we can do to work around this unfortunately. Since this was a temporary error from Azure I believe this should now be resolved and work as normal (our Acceptance Tests are passing for Postgres too) - would you be able to take a look and see if this now works for you? As I believe this should now be resolved I'm going to close this issue for the moment but please let us know if that still doesn't work for you and we'll take another look :) Thanks! |
we can reproduce this issue for a while in
|
@tombuildsstuff / @NickMetz , In my case the issue was the database session being open and not disconnected. If you disconnect all DB sessions, the error would go away. |
@svangeti this issue is more related to database collation. This is what happens on Azure backend side: The request failed :
Unfortunately it seems that Azure uses collations with hyphen instead of underscore. This was also topic of an old issue #396. Looking into terraform documentation shows that we sent db collations to API with underscore. Azure has a wrapper and will transform e.g. de_DE to de-DE, so we should not see any issue at this point. But my guess is this process is failing in case of retries and other unknows triggers on Azure side.
So from my prospective we have two issues:
Solution:
|
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 👉 [email protected]. Thanks! |
This has been released in version 1.37.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 = "~> 1.37.0"
}
# ... other configuration ... |
Terraform (and AzureRM Provider) Version
Terraform -v = 0.11.8
azurerm: version = "~> 1.30"
Affected Resource(s)
azurerm_postgresql_database
Terraform Configuration Files
Debug Output
Expected Behavior
It should destroy the resources from Azure
Actual Behavior
Error: Error applying plan:
1 error(s) occurred:
Terraform does not automatically rollback in the face of errors.
Steps to Reproduce
terraform apply
terraform destroy
The text was updated successfully, but these errors were encountered: