Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.68k stars 5.1k forks source link

GatewayTimeout for `Microsoft.Sql/managedInstances` with `api-version=2020-11-01-preview` / `v5.0` #16838

Open aristosvo opened 2 years ago

aristosvo commented 2 years ago

When trying to create a Managed Instance with v5.0 of the Microsoft.Sql API, GatewayTimeouts are showing up:

2021/11/22 11:06:07 [DEBUG] AzureRM Request: 
PUT /subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122110104907711/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122110104907711?api-version=2020-11-01-preview HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.17.2 (amd64-darwin) go-autorest/v14.2.1 Azure-SDK-For-Go/v59.0.0 sql/v5.0 HashiCorp Terraform/1.0.10 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azurerm/acc pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 741
Content-Type: application/json; charset=utf-8
X-Ms-Correlation-Request-Id: 52b7fe49-a1a8-4277-b16c-882145176c07
Accept-Encoding: gzip

{"identity":{"type":"None"},"location":"westeurope","properties":{"administratorLogin":"mradministrator","administratorLoginPassword":"thisIsDog11","collation":"SQL_Latin1_General_CP1_CI_AS","dnsZonePartner":"","licenseType":"BasePrice","minimalTlsVersion":"1.2","proxyOverride":"Default","publicDataEndpointEnabled":false,"storageAccountType":"LRS","storageSizeInGB":32,"subnetId":"/subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122110104907711/providers/Microsoft.Network/virtualNetworks/acctest-vnet-211122110104907711/subnets/subnet-211122110104907711","timezoneId":"UTC","vCores":4},"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5"},"tags":{"database":"test","environment":"staging"}}
2021/11/22 11:08:08 [DEBUG] AzureRM Response for https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122110104907711/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122110104907711?api-version=2020-11-01-preview: 
HTTP/2.0 504 Gateway Timeout
Content-Length: 141
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 22 Nov 2021 10:08:09 GMT
Expires: -1
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 52b7fe49-a1a8-4277-b16c-882145176c07
X-Ms-Failure-Cause: service
X-Ms-Request-Id: 28aecb60-f322-42dc-b320-ac1b2657074d
X-Ms-Routing-Request-Id: WESTEUROPE:20211122T100810Z:28aecb60-f322-42dc-b320-ac1b2657074d

{"error":{"code":"GatewayTimeout","message":"The gateway did not receive a response from 'Microsoft.Sql' within the specified time period."}}

I'll further investigate if this is currently also occurring for older versions, I'll update this post as soon as it's seen.

Edit: older version is working fine:

2021/11/22 12:55:01 [DEBUG] AzureRM Request: 
PUT /subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122125253902068/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122125253902068?api-version=2018-06-01-preview HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.17.2 (amd64-darwin) go-autorest/v14.2.1 Azure-SDK-For-Go/v59.0.0 sql/2018-06-01-preview HashiCorp Terraform/1.0.10 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azurerm/acc pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 687
Content-Type: application/json; charset=utf-8
X-Ms-Correlation-Request-Id: 78378c42-b467-c6cf-54f0-ad6c9d294e40
Accept-Encoding: gzip

{"location":"westeurope","properties":{"administratorLogin":"mradministrator","administratorLoginPassword":"thisIsDog11","collation":"SQL_Latin1_General_CP1_CI_AS","dnsZonePartner":"","licenseType":"BasePrice","minimalTlsVersion":"1.2","proxyOverride":"Default","publicDataEndpointEnabled":false,"storageSizeInGB":32,"subnetId":"/subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122125253902068/providers/Microsoft.Network/virtualNetworks/acctest-vnet-211122125253902068/subnets/subnet-211122125253902068","timezoneId":"UTC","vCores":4},"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5"},"tags":{"database":"test","environment":"staging"}}
2021/11/22 12:55:02 [DEBUG] AzureRM Response for https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122125253902068/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122125253902068?api-version=2018-06-01-preview: 
HTTP/2.0 202 Accepted
Content-Length: 73

Edit 2: Creation without identity.Type configured in case of it being None seems to fix the issue (identityType None is a new option in v5.0). However, this is returned in the response, making it a bit weird and definitely a bug:

2021/11/22 13:19:04 [DEBUG] AzureRM Request: 
PUT /subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122131655113195/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122131655113195?api-version=2020-11-01-preview HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.17.2 (amd64-darwin) go-autorest/v14.2.1 Azure-SDK-For-Go/v59.0.0 sql/v5.0 HashiCorp Terraform/1.0.10 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azurerm/acc pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 714
Content-Type: application/json; charset=utf-8
X-Ms-Correlation-Request-Id: 451246e3-e3ac-5afa-1489-75f19bcc1658
Accept-Encoding: gzip

{"location":"westeurope","properties":{"administratorLogin":"mradministrator","administratorLoginPassword":"thisIsDog11","collation":"SQL_Latin1_General_CP1_CI_AS","dnsZonePartner":"","licenseType":"BasePrice","minimalTlsVersion":"1.2","proxyOverride":"Default","publicDataEndpointEnabled":false,"storageAccountType":"GRS","storageSizeInGB":32,"subnetId":"/subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122131655113195/providers/Microsoft.Network/virtualNetworks/acctest-vnet-211122131655113195/subnets/subnet-211122131655113195","timezoneId":"UTC","vCores":4},"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5"},"tags":{"database":"test","environment":"staging"}}
2021/11/22 13:19:06 [DEBUG] AzureRM Response for https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122131655113195/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122131655113195?api-version=2020-11-01-preview: 
HTTP/2.0 201 Created
Content-Length: 843
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 22 Nov 2021 12:19:06 GMT
Expires: -1
Pragma: no-cache
Retry-After: 60
Server: Microsoft-HTTPAPI/2.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 451246e3-e3ac-5afa-1489-75f19bcc1658
X-Ms-Ratelimit-Remaining-Subscription-Writes: 1199
X-Ms-Request-Id: a2bea0e1-9455-4694-a2e2-d36530fd8272
X-Ms-Routing-Request-Id: WESTEUROPE:20211122T121906Z:11ff1daa-bb11-4fae-bc74-b8f7ee53e885

{"identity":{"type":"None"},"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"provisioningState":"Creating","administratorLogin":"mradministrator","licenseType":"BasePrice","vCores":4,"storageSizeInGB":32,"collation":"SQL_Latin1_General_CP1_CI_AS","publicDataEndpointEnabled":false,"proxyOverride":"Default","timezoneId":"UTC","maintenanceConfigurationId":"SystemDefault","privateEndpointConnections":[],"minimalTlsVersion":"1.2","storageAccountType":"GRS"},"location":"westeurope","tags":{"database":"test","environment":"staging"},"id":"/subscriptions/<subscriptionId>/resourceGroups/acctestRG-sql-211122131655113195/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122131655113195","name":"acctestsqlserver211122131655113195","type":"Microsoft.Sql/managedInstances"}

Blocked down-stream PRs (Terraform Provider for Azure, extra functionality)

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureSQLGitHub.

Issue Details
When trying to create a Managed Instance with `v5.0` of the Microsoft.Sql API, GatewayTimeouts are showing up: ```bash 2021/11/22 11:06:07 [DEBUG] AzureRM Request: PUT /subscriptions//resourceGroups/acctestRG-sql-211122110104907711/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122110104907711?api-version=2020-11-01-preview HTTP/1.1 Host: management.azure.com User-Agent: Go/go1.17.2 (amd64-darwin) go-autorest/v14.2.1 Azure-SDK-For-Go/v59.0.0 sql/v5.0 HashiCorp Terraform/1.0.10 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azurerm/acc pid-222c6c49-1b0a-5959-a213-6608f9eb8820 Content-Length: 741 Content-Type: application/json; charset=utf-8 X-Ms-Correlation-Request-Id: 52b7fe49-a1a8-4277-b16c-882145176c07 Accept-Encoding: gzip {"identity":{"type":"None"},"location":"westeurope","properties":{"administratorLogin":"mradministrator","administratorLoginPassword":"thisIsDog11","collation":"SQL_Latin1_General_CP1_CI_AS","dnsZonePartner":"","licenseType":"BasePrice","minimalTlsVersion":"1.2","proxyOverride":"Default","publicDataEndpointEnabled":false,"storageAccountType":"LRS","storageSizeInGB":32,"subnetId":"/subscriptions//resourceGroups/acctestRG-sql-211122110104907711/providers/Microsoft.Network/virtualNetworks/acctest-vnet-211122110104907711/subnets/subnet-211122110104907711","timezoneId":"UTC","vCores":4},"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5"},"tags":{"database":"test","environment":"staging"}} 2021/11/22 11:08:08 [DEBUG] AzureRM Response for https://management.azure.com/subscriptions//resourceGroups/acctestRG-sql-211122110104907711/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122110104907711?api-version=2020-11-01-preview: HTTP/2.0 504 Gateway Timeout Content-Length: 141 Cache-Control: no-cache Content-Type: application/json; charset=utf-8 Date: Mon, 22 Nov 2021 10:08:09 GMT Expires: -1 Pragma: no-cache Strict-Transport-Security: max-age=31536000; includeSubDomains X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: 52b7fe49-a1a8-4277-b16c-882145176c07 X-Ms-Failure-Cause: service X-Ms-Request-Id: 28aecb60-f322-42dc-b320-ac1b2657074d X-Ms-Routing-Request-Id: WESTEUROPE:20211122T100810Z:28aecb60-f322-42dc-b320-ac1b2657074d {"error":{"code":"GatewayTimeout","message":"The gateway did not receive a response from 'Microsoft.Sql' within the specified time period."}} ``` I'll further investigate if this is currently also occurring for older versions, I'll update this post as soon as it's seen. **Edit**: older version is working fine: ```bash 2021/11/22 12:55:01 [DEBUG] AzureRM Request: PUT /subscriptions//resourceGroups/acctestRG-sql-211122125253902068/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122125253902068?api-version=2018-06-01-preview HTTP/1.1 Host: management.azure.com User-Agent: Go/go1.17.2 (amd64-darwin) go-autorest/v14.2.1 Azure-SDK-For-Go/v59.0.0 sql/2018-06-01-preview HashiCorp Terraform/1.0.10 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azurerm/acc pid-222c6c49-1b0a-5959-a213-6608f9eb8820 Content-Length: 687 Content-Type: application/json; charset=utf-8 X-Ms-Correlation-Request-Id: 78378c42-b467-c6cf-54f0-ad6c9d294e40 Accept-Encoding: gzip {"location":"westeurope","properties":{"administratorLogin":"mradministrator","administratorLoginPassword":"thisIsDog11","collation":"SQL_Latin1_General_CP1_CI_AS","dnsZonePartner":"","licenseType":"BasePrice","minimalTlsVersion":"1.2","proxyOverride":"Default","publicDataEndpointEnabled":false,"storageSizeInGB":32,"subnetId":"/subscriptions//resourceGroups/acctestRG-sql-211122125253902068/providers/Microsoft.Network/virtualNetworks/acctest-vnet-211122125253902068/subnets/subnet-211122125253902068","timezoneId":"UTC","vCores":4},"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5"},"tags":{"database":"test","environment":"staging"}} 2021/11/22 12:55:02 [DEBUG] AzureRM Response for https://management.azure.com/subscriptions//resourceGroups/acctestRG-sql-211122125253902068/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122125253902068?api-version=2018-06-01-preview: HTTP/2.0 202 Accepted Content-Length: 73 ``` Edit 2: Creation without `identity.Type` configured in case of it being `None` seems to fix the issue (identityType `None` is a new option in `v5.0`). However, this is returned in the response, making it a bit weird and definitely a bug: ```bash 2021/11/22 13:19:04 [DEBUG] AzureRM Request: PUT /subscriptions//resourceGroups/acctestRG-sql-211122131655113195/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122131655113195?api-version=2020-11-01-preview HTTP/1.1 Host: management.azure.com User-Agent: Go/go1.17.2 (amd64-darwin) go-autorest/v14.2.1 Azure-SDK-For-Go/v59.0.0 sql/v5.0 HashiCorp Terraform/1.0.10 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azurerm/acc pid-222c6c49-1b0a-5959-a213-6608f9eb8820 Content-Length: 714 Content-Type: application/json; charset=utf-8 X-Ms-Correlation-Request-Id: 451246e3-e3ac-5afa-1489-75f19bcc1658 Accept-Encoding: gzip {"location":"westeurope","properties":{"administratorLogin":"mradministrator","administratorLoginPassword":"thisIsDog11","collation":"SQL_Latin1_General_CP1_CI_AS","dnsZonePartner":"","licenseType":"BasePrice","minimalTlsVersion":"1.2","proxyOverride":"Default","publicDataEndpointEnabled":false,"storageAccountType":"GRS","storageSizeInGB":32,"subnetId":"/subscriptions//resourceGroups/acctestRG-sql-211122131655113195/providers/Microsoft.Network/virtualNetworks/acctest-vnet-211122131655113195/subnets/subnet-211122131655113195","timezoneId":"UTC","vCores":4},"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5"},"tags":{"database":"test","environment":"staging"}} 2021/11/22 13:19:06 [DEBUG] AzureRM Response for https://management.azure.com/subscriptions//resourceGroups/acctestRG-sql-211122131655113195/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122131655113195?api-version=2020-11-01-preview: HTTP/2.0 201 Created Content-Length: 843 Cache-Control: no-cache Content-Type: application/json; charset=utf-8 Date: Mon, 22 Nov 2021 12:19:06 GMT Expires: -1 Pragma: no-cache Retry-After: 60 Server: Microsoft-HTTPAPI/2.0 Strict-Transport-Security: max-age=31536000; includeSubDomains X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: 451246e3-e3ac-5afa-1489-75f19bcc1658 X-Ms-Ratelimit-Remaining-Subscription-Writes: 1199 X-Ms-Request-Id: a2bea0e1-9455-4694-a2e2-d36530fd8272 X-Ms-Routing-Request-Id: WESTEUROPE:20211122T121906Z:11ff1daa-bb11-4fae-bc74-b8f7ee53e885 {"identity":{"type":"None"},"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":4},"properties":{"provisioningState":"Creating","administratorLogin":"mradministrator","licenseType":"BasePrice","vCores":4,"storageSizeInGB":32,"collation":"SQL_Latin1_General_CP1_CI_AS","publicDataEndpointEnabled":false,"proxyOverride":"Default","timezoneId":"UTC","maintenanceConfigurationId":"SystemDefault","privateEndpointConnections":[],"minimalTlsVersion":"1.2","storageAccountType":"GRS"},"location":"westeurope","tags":{"database":"test","environment":"staging"},"id":"/subscriptions//resourceGroups/acctestRG-sql-211122131655113195/providers/Microsoft.Sql/managedInstances/acctestsqlserver211122131655113195","name":"acctestsqlserver211122131655113195","type":"Microsoft.Sql/managedInstances"} ``` # Blocked down-stream PRs (Terraform Provider for Azure, extra functionality) - https://github.com/hashicorp/terraform-provider-azurerm/pull/13974 - https://github.com/hashicorp/terraform-provider-azurerm/pull/14104 - https://github.com/hashicorp/terraform-provider-azurerm/pull/14123
Author: aristosvo
Assignees: -
Labels: `question`, `Service Attention`, `customer-reported`, `SQL - Managed Instance`, `needs-triage`
Milestone: -
tombuildsstuff commented 2 years ago

Any update on this one? @azureSQLGitHub?

manicminer commented 2 years ago

+1 this is preventing removal of an identity from an existing managed instance resource