microsoft / AzureTRE

An accelerator to help organizations build Trusted Research Environments on Azure.
https://microsoft.github.io/AzureTRE
MIT License
182 stars 139 forks source link

use of short_workspace_id for naming workspace storage accounts leads to collisions #3921

Closed TonyWildish-BH closed 5 months ago

TonyWildish-BH commented 5 months ago

Describe the bug Workspaces are created with storage accounts (and possibly other resources) that use the last four digits of the workspace ID. This can lead to collisions, such as the message below:

storage.AccountsClient#Create: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="StorageAccountAlreadyTaken" Message="The storage account named stgws**** is already taken."

That's not too surprising, with only 64K possible names matching that pattern the chance of a collision is not too small. The names need to be much more random than this.

Steps to reproduce

  1. just create lots of workspaces and look for failures.

Azure TRE release version (e.g. v0.14.0 or main): main

Deployed Azure TRE components - click the (i) in the UI:

marrobi commented 5 months ago

Closing as duplicate of #2893 .

PR - #3863 is a workaround we will look to merge for the next release.

Long term fix has some dependencies, but is prioritised on the backlog.