Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.67k stars 5.09k forks source link

Storage Table Service can not be set #11319

Open yupwei68 opened 4 years ago

yupwei68 commented 4 years ago
  1. set table service: PUT /subscriptions/.../resourceGroups/acctestAzureRMSA-201022094141182146/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct7sevj/tableServices/default?api-version=2019-06-01 HTTP/1.1 {"properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET","PUT","PATCH"],"maxAgeInSeconds":500,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["x-tempo-*"]}]}}}

Response: Date: Thu, 22 Oct 2020 01:42:22 GMT Expires: -1 Pragma: no-cache Server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: max-age=31536000; includeSubDomains Vary: Accept-Encoding X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: ac6d8d1a-7372-0d9f-666c-5b381ef215eb X-Ms-Ratelimit-Remaining-Subscription-Writes: 1199 X-Ms-Request-Id: 3862f3dc-04a3-4d46-8737-cb8038f6bcd8 X-Ms-Routing-Request-Id: SOUTHEASTASIA:20201022T014222Z:aca526e7-37fa-45ee-bde1-60f63cbb2463

{"id":"/subscriptions/.../resourceGroups/acctestAzureRMSA-201022094141182146/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct7sevj/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET","PUT","PATCH"],"maxAgeInSeconds":500,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["x-tempo-*"]}]}}}

  1. Then get the service: GET /subscriptions/.../resourceGroups/acctestAzureRMSA-201022094141182146/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct7sevj/tableServices/default?api-version=2019-06-01 HTTP/1.1

Response: Date: Thu, 22 Oct 2020 01:42:30 GMT Expires: -1 Pragma: no-cache Server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: max-age=31536000; includeSubDomains Vary: Accept-Encoding X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: ac6d8d1a-7372-0d9f-666c-5b381ef215eb X-Ms-Ratelimit-Remaining-Subscription-Reads: 11994 X-Ms-Request-Id: b48aa60b-98f3-41af-9a71-a4fec59e7f2b X-Ms-Routing-Request-Id: SOUTHEASTASIA:20201022T014230Z:43c41f27-a35f-4506-ab40-27bcfbe87e17

{"id":"/subscriptions/.../resourceGroups/acctestAzureRMSA-201022094141182146/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct7sevj/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[]}}}

blueww commented 4 years ago

@zfchen95 Would you please help to look? Why the Cors set to table service properties not return with get table service properties ?

ghost commented 4 years ago

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

yupwei68 commented 3 years ago

Hi, this problem still exists. Though service team has provided a workaround, which is to wait 30 seconds after table service operation. This workaround could not be accepted by Hashicorp for this is not durable and it's against arm rule for operation. (The operation should be completed before we receive the response or LRO polling response).

New reproducing log: PUT /subscriptions/.../resourceGroups/acctestRG-storage-210615162352436981/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct4cr7h/tableServices/default?api-version=2019-06-01 HTTP/1.1 {"properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET"],"maxAgeInSeconds":2000000000,"exposedHeaders":["x-tempo-*","x-method-*"],"allowedHeaders":["*"]},{"allowedOrigins":["http://www.test.com"],"allowedMethods":["PUT"],"maxAgeInSeconds":1000,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["*"]}]}}}

[DEBUG] AzureRM Response for https://management.azure.com/subscriptions/.../resourceGroups/acctestRG-storage-210615162352436981/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct4cr7h/tableServices/default?api-version=2019-06-01: HTTP/2.0 200 OK Cache-Control: no-cache Content-Type: application/json Date: Tue, 15 Jun 2021 08:26:31 GMT Expires: -1 Pragma: no-cache Server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: max-age=31536000; includeSubDomains Vary: Accept-Encoding X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: f1d01b2a-7e34-50c8-5374-669ccfe4644d X-Ms-Ratelimit-Remaining-Subscription-Writes: 1199 X-Ms-Request-Id: 17afacbf-e734-4106-804f-9b3511f86155 X-Ms-Routing-Request-Id: SOUTHEASTASIA:20210615T082631Z:fab9abc9-7fd9-49b8-b807-5a16404897e1

{"id":"/subscriptions/.../resourceGroups/acctestRG-storage-210615162352436981/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct4cr7h/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET"],"maxAgeInSeconds":2000000000,"exposedHeaders":["x-tempo-*","x-method-*"],"allowedHeaders":["*"]},{"allowedOrigins":["http://www.test.com"],"allowedMethods":["PUT"],"maxAgeInSeconds":1000,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["*"]}]}}}

GET /subscriptions/.../resourceGroups/acctestRG-storage-210615162352436981/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct4cr7h/tableServices/default?api-version=2019-06-01 HTTP/1.1 [DEBUG] AzureRM Response for https://management.azure.com/subscriptions/.../resourceGroups/acctestRG-storage-210615162352436981/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct4cr7h/tableServices/default?api-version=2019-06-01: HTTP/2.0 200 OK Cache-Control: no-cache Content-Type: application/json Date: Tue, 15 Jun 2021 08:26:35 GMT Expires: -1 Pragma: no-cache Server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: max-age=31536000; includeSubDomains Vary: Accept-Encoding X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: f1d01b2a-7e34-50c8-5374-669ccfe4644d X-Ms-Ratelimit-Remaining-Subscription-Reads: 11996 X-Ms-Request-Id: b600602f-b5cb-4e4b-b666-595df3425769 X-Ms-Routing-Request-Id: SOUTHEASTASIA:20210615T082635Z:c1be8bf4-6c2e-407c-a348-a15f5b4997c6

{"id":"/subscriptions/.../resourceGroups/acctestRG-storage-210615162352436981/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct4cr7h/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET","PUT","PATCH"],"maxAgeInSeconds":500,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["x-tempo-*"]}]}}}

yupwei68 commented 3 years ago

This could be reproduced in version 2021-01-01 PUT /subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-storage-210616150844028594/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct13l8a/tableServices/default?api-version=2021-01-01 HTTP/1.1 {"properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET"],"maxAgeInSeconds":2000000000,"exposedHeaders":["x-tempo-*","x-method-*"],"allowedHeaders":["*"]},{"allowedOrigins":["http://www.test.com"],"allowedMethods":["PUT"],"maxAgeInSeconds":1000,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["*"]}]}}}

Response: [DEBUG] AzureRM Response for https://management.azure.com/subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-storage-210616150844028594/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct13l8a/tableServices/default?api-version=2021-01-01: HTTP/2.0 200 OK Cache-Control: no-cache Content-Type: application/json Date: Wed, 16 Jun 2021 07:11:25 GMT Expires: -1 Pragma: no-cache Server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: max-age=31536000; includeSubDomains Vary: Accept-Encoding X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: 06058ce7-bfb5-1afa-b97e-373eb40977b3 X-Ms-Ratelimit-Remaining-Subscription-Writes: 1196 X-Ms-Request-Id: 097a8454-0c1b-4c52-8d7d-62ef31f304d6 X-Ms-Routing-Request-Id: SOUTHEASTASIA:20210616T071125Z:b1656341-a188-4910-a9e6-0889360c998c

{"id":"/subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-storage-210616150844028594/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct13l8a/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET"],"maxAgeInSeconds":2000000000,"exposedHeaders":["x-tempo-*","x-method-*"],"allowedHeaders":["*"]},{"allowedOrigins":["http://www.test.com"],"allowedMethods":["PUT"],"maxAgeInSeconds":1000,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["*"]}]}}}

GET /subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-storage-210616150844028594/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct13l8a/tableServices/default?api-version=2021-01-01 HTTP/1.1

Response: HTTP/2.0 200 OK Cache-Control: no-cache Content-Type: application/json Date: Wed, 16 Jun 2021 07:11:28 GMT Expires: -1 Pragma: no-cache Server: Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 Strict-Transport-Security: max-age=31536000; includeSubDomains Vary: Accept-Encoding X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: 06058ce7-bfb5-1afa-b97e-373eb40977b3 X-Ms-Ratelimit-Remaining-Subscription-Reads: 11915 X-Ms-Request-Id: e773f96e-287a-47a8-b3e8-58127eade50f X-Ms-Routing-Request-Id: SOUTHEASTASIA:20210616T071129Z:77ba7eee-6cf8-418b-826d-08354461a8fa

{"id":"/subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-storage-210616150844028594/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acct13l8a/tableServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/tableServices","properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET","PUT","PATCH"],"maxAgeInSeconds":500,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["x-tempo-*"]}]}}}