Azure / Azure/azure-quickstart-templates
[Custom extension] Custom extension script fails with permission issue on SQL Server VM
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
Scenario:
We need to create SQL server DB user through custom extension script. We have PowerShell script for this, which runs SQL statements to create DB user and to assign roles.
Observed:
The custom extension script creates the user successfully most of times, but sometimes randomly fails with permission issue.
Debugging:
I believe the custom extension scripts run as SYSTEM user. When I check DB, I can see SYSTEM user has full admin privileges on the DB. Also, same script runs fine without any issue post SQL server VM provisioning(On same VM where script had failed with permission issue when run as extension).
We have tested our custom script for consistency by calling the script in loop about 100 times on already running VM. We did not observe any issue with script itself.
Any feedback or ideas for debugging this issue will be appreciated.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the PowerShell custom extension during SQL Server VM provisioning, then compare its execution identity, timing, and permissions with the same script run after provisioning. The issue names no repository files or tests, so investigation must first locate the custom extension and VM provisioning configuration. Done means identifying the intermittent permission cause and documenting or implementing a reliable fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell, sql
- Domain
- cloud, databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100