Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate resource name when similarly named SREs deployed #2370

Open
5 tasks done
helendduncan opened this issue Jan 20, 2025 · 2 comments
Open
5 tasks done

Duplicate resource name when similarly named SREs deployed #2370

helendduncan opened this issue Jan 20, 2025 · 2 comments
Labels
bug Problem when deploying a Data Safe Haven.

Comments

@helendduncan
Copy link

helendduncan commented Jan 20, 2025

✅ Checklist

  • I have searched open and closed issues for duplicates.
  • This is a problem observed when deploying a Data Safe Haven.
  • I can reproduce this with the latest version.
  • I have read through the documentation.
  • This isn't an open-ended question (open a discussion if it is).

💻 System information

  • Operating System: macOS
  • Data Safe Haven version: 5.2.1

📦 Packages

List of packages
Paste list of packages here

🚫 Describe the problem

Error occurs when deploying an SRE named for example dsg1234 when an existing SRE named dsg9876 has already been deployed.
SREs are in different subscriptions but share an SHM

    --------------------------------------------------------------------------------                                   
    RESPONSE 409: 409 Conflict                                                                                         
    ERROR CODE: StorageAccountAlreadyTaken                                                                             
    --------------------------------------------------------------------------------                                   
    {                                                                                                                  
      "error": {                                                                                                       
        "code": "StorageAccountAlreadyTaken",                                                                          
        "message": "The storage account named shprosredsgdesiredstate6 is already taken."                              
      }                                                                                                                
    }                                                                                                                  
    --------------------------------------------------------------------------------    

Error likely due to how names are generated via sections of the original deployment name

Current workaround is to tear down the partially deployed dsg1234 config, rename is 1234dsg and rebuild

🌳 Log messages

Relevant log messages
    --------------------------------------------------------------------------------                                   
    RESPONSE 409: 409 Conflict                                                                                         
    ERROR CODE: StorageAccountAlreadyTaken                                                                             
    --------------------------------------------------------------------------------                                   
    {                                                                                                                  
      "error": {                                                                                                       
        "code": "StorageAccountAlreadyTaken",                                                                          
        "message": "The storage account named shprosredsgdesiredstate6 is already taken."                              
      }                                                                                                                
    }                                                                                                                  
    --------------------------------------------------------------------------------    

♻️ To reproduce

@helendduncan helendduncan added the bug Problem when deploying a Data Safe Haven. label Jan 20, 2025
@jemrobinson
Copy link
Member

How important is it for these storage accounts to have meaningful names? We could relatively easily give this a reproducibly random name that has much less context. Currently we include as much as possible of:

shm ${shm_name} sre {$sre_name} desired state

as we can fit into 24 characters. Which bits of this information are actually useful @helendduncan ?

@helendduncan
Copy link
Author

helendduncan commented Jan 20, 2025

For me the SRE name would be the most important - and for things like DSGs I would be inclined to call them DSGA DSGB, just for the management outside of the SRE.
Also within the context of DSGs we've had issues with names being similar - lots of 3 letter initialisms - which has proved to be confusing in the past.
So in order of preference: (edited)

  1. Documentation on how the names are built so can make an informed decision on naming conventions
  2. completely random
  3. no SHM, more of the SRE name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Problem when deploying a Data Safe Haven.
Projects
None yet
Development

No branches or pull requests

2 participants