Skip to content

az storage account create can incorrectly report failure under load / throttling conditions #31148

@MattGal

Description

@MattGal

Describe the bug

Current Behavior:

  1. The Azure subscription in question is receiving lots of programmatic MICROSOFT.STORAGE calls... say from a bunch of machines running the Az CLI.
  2. The user calls az storage account create ... with correct values.
  3. The SDK calls PUT/SUBSCRIPTIONS/RESOURCEGROUPS/PROVIDERS/MICROSOFT.STORAGE/STORAGEACCOUNTS
  4. The Azure API responds to the SDK with a 429 or 503, but creates it anyway.
  5. Given the typically-retry-able nature of 429 / 503, the SDK sleeps until the retry-after period elapses and tries the API again; this time it gets an HTTP 409 because the storage account already exists
  6. The SDK translates the HTTP 409 in account creation to "An operation is currently performing on this storage account that requires exclusive access" which is not very helpful
  7. The CLI sees a non-continuable 409 / conflict in the response, and bubbles the above string to the user

Related command

az storage account create

Errors

"An operation is currently performing on this storage account that requires exclusive access"

Issue script & Debug output

N/A - This was taken from logs.

I can provide console logs and (more importantly) queries to show all ARM logging of this behavior happening via reaching out to me on internal email or Teams.

Expected behavior

Desired behavior:

  • The Storage API should either ensure a 202/200 response when accounts are created successfully, and only return 429/ 503 in cases where the change was not even attempted.
  • The Storage Management Client SDK should provide more useful error messages so users hitting this understand that it was on a retry, possibly even detecting that the original request succeeded.
  • The Azure CLI should make the above problem not a problem for its users, either by detecting that the original request succeeded and changing from PUT to GET or other means.

Environment Summary

azure cli 2.53.1

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStorageaz storagequestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions