Azure / azure-rest-api-specs

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

Storage Blob Service ContainerOperationFailure #11237

Open yupwei68 opened 4 years ago

yupwei68 commented 4 years ago
  1. PUT /subscriptions/.../resourceGroups/.../providers/Microsoft.Storage/storageAccounts/.../blobServices/default?api-version=2019-06-01

{"properties":{"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET","PUT","PATCH"],"maxAgeInSeconds":500,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["x-tempo-*"]}]},"deleteRetentionPolicy":{"enabled":true,"days":300},"isVersioningEnabled":true,"changeFeed":{"enabled":true},"restorePolicy":{"days":5,"enabled":true}}}

200 OK

  1. PUT /subscriptions/.../resourceGroups/.../providers/Microsoft.Storage/storageAccounts/.../blobServices/default?api-version=2019-06-01

{"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":["*"]}]},"deleteRetentionPolicy":{"enabled":true,"days":7},"isVersioningEnabled":false,"changeFeed":{"enabled":true},"restorePolicy":{"enabled":false}}}

413 Preconditional Failed { "error": { "code": "ContainerOperationFailure", "message": "The condition specified using HTTP conditional header(s) is not met.\nRequestId:13ccb51b-301e-006c-0f92-a3728a000000\nTime:2020-10-16T07:57:33.7722711Z" } }

It's wield if we directly set the second property, it could work. But if we set the first property, then set the second property, it fails. x-ms-request-id e14b2950-e517-47e9-9456-8755b34d7860

ghost commented 4 years ago

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

blueww commented 4 years ago

@zfchen95 Would you please help to look at the 413 error?

yupwei68 commented 4 years ago

On fact, after first update, the blob service could not be updated in 12 minutes or longer.

  1. PUT /subscriptions/.../resourceGroups/acctestAzureRMSA-201028133158646092/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acctqgubk/blobServices/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-*"]}]},"deleteRetentionPolicy":{"enabled":true,"days":300},"isVersioningEnabled":true,"changeFeed":{"enabled":true},"restorePolicy":{"days":5,"enabled":true}}}

HTTP/2.0 200 OK Cache-Control: no-cache Content-Type: application/json Date: Wed, 28 Oct 2020 05:34:47 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: f347bf01-2468-bddd-5664-42986973def6 X-Ms-Ratelimit-Remaining-Subscription-Writes: 1191 X-Ms-Request-Id: 533d479d-9056-49a2-9cbf-a18fbf3b9c2b X-Ms-Routing-Request-Id: SOUTHEASTASIA:20201028T053447Z:90f2e197-37fe-4673-a772-c88ba469c699

{"id":"/subscriptions/.../resourceGroups/acctestAzureRMSA-201028133158646092/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acctqgubk/blobServices/default","name":"default","type":"Microsoft.Storage/storageAccounts/blobServices","properties":{"changeFeed":{"enabled":true},"restorePolicy":{"enabled":true,"days":5},"cors":{"corsRules":[{"allowedOrigins":["http://www.example.com"],"allowedMethods":["GET","PUT","PATCH"],"maxAgeInSeconds":500,"exposedHeaders":["x-tempo-*"],"allowedHeaders":["x-tempo-*"]}]},"deleteRetentionPolicy":{"enabled":true,"days":300},"isVersioningEnabled":true}}

  1. PUT /subscriptions/.../resourceGroups/acctestAzureRMSA-201028133158646092/providers/Microsoft.Storage/storageAccounts/unlikely23exst2acctqgubk/blobServices/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":["*"]}]},"deleteRetentionPolicy":{"enabled":true,"days":7},"isVersioningEnabled":true,"changeFeed":{"enabled":false},"restorePolicy":{"enabled":false}}}

HTTP/2.0 412 Precondition Failed Content-Length: 210 Cache-Control: no-cache Content-Type: application/json Date: Wed, 28 Oct 2020 05:46:00 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 X-Content-Type-Options: nosniff X-Ms-Correlation-Request-Id: f347bf01-2468-bddd-5664-42986973def6 X-Ms-Ratelimit-Remaining-Subscription-Writes: 1199 X-Ms-Request-Id: 515221fd-ee3a-4697-a3d9-01c6537ace89 X-Ms-Routing-Request-Id: SOUTHEASTASIA:20201028T054601Z:ed275dc6-a00e-4531-af94-b4a86479a74e

{"error":{"code":"ContainerOperationFailure","message":"The condition specified using HTTP conditional header(s) is not met.\nRequestId:9630709c-101e-002e-01ed-ac9034000000\nTime:2020-10-28T05:46:01.0843639Z"}}

aristosvo commented 3 years ago

@zfchen95 Is this already being addressed? Using the portal I'm able to change all kinds of settings within seconds, what is the difference?

It would be awesome to have a timeline or reaction on this issue.

Hjortsberg commented 3 years ago

@zfchen95 @blueww, Do you have any update on this?

timja commented 3 years ago

@yupwei68 / @zfchen95 is there any work going on to look at this?

Thanks :)

zfchen95 commented 3 years ago

hi, the error seems a bit old. It happened in 2020. Do you have a more recent repro?

aristosvo commented 3 years ago

Yes, here. The problem was similar.

I assume all complaints are coming from the Terraform provider for Azure as this limits adding functionality to it.

matt-byrne commented 2 years ago

This is still blocking https://github.com/hashicorp/terraform-provider-azurerm/issues/9020 which is a pretty important feature.

Any update on this?

zfchen95 commented 2 years ago

@blueww could you please help involve the right contact in the Storage team? I am not with Microsoft anymore.

blueww commented 2 years ago

@HimanshuChhabra , @priyapansrp Would you please help to look at this SRP server issue?

ByMitta commented 2 years ago

I am also encountering the same error. Though I am not using Terraform but Bicep which translates it to an ARM Template which is deployed using a Azure DevOps pipeline task.

The initial deploy of the storage account was successful. Another deploy after that I enabled PITR which was also successful. But the deploys after these, with no changes in the bicep/arm template are given me the same error now.

API Version: storageAccounts@2021-09-01 Bicep version: v0.9.1 Azure DevOps task: AzureResourceGroupDeployment@2

Are there any updates on this?