Azure / Azure/RDS-Templates

Make dependsOn check more granular to improve parallelism and reduce cascading failures

Open
#541 1 comment 0 reactions 0 assignees View on GitHub
1-Create-and-provision-host-pool-arm 2-Update-existing-WVD-host-pool-arm
Dominant language
PowerShell
Stars
524
Forks
610
PR merge metrics
No merged PRs in 30d

Description

The nested template files under /ARM-wvd-templates/nestedtemplates/ , such as
[ARM-wvd-templates/nestedtemplates/managedDisks-galleryvm.json](https://github.com/Azure/RDS-Templates/blob/master/ARM-wvd-templates/nestedtemplates/managedDisks-galleryvm.json) should update the joindomain and dscextension resources declarations to depend on only on the vm it needs to run on instead of all VMs. The advantage of this is that the join domain and dscextension can run on an individual vm as soon as it is ready, also if one vm fails at some point it won't cause all of the other vms to fail like it does now.

For example for joindomain instead of
`"dependsOn": ["rdsh-vm-loop"],`
it would be something like
```
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('rdshPrefix'), copyindex(), parameters('rdshPrefix'), add(copyindex(), parameters('vmInitialNumber')) )]"
],
```

This change is already implemented here [wvd-templates/Create and provision WVD host pool/mainTemplate.json](https://github.com/Azure/RDS-Templates/blob/wvd-templates_preview_20200716.1800.0/wvd-templates/Create%20and%20provision%20WVD%20host%20pool/mainTemplate.json) , although ignore the special case for the 0 index as that doesn't apply to this template.

FYI @nakranimohit0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with ARM-wvd-templates/nestedtemplates/managedDisks-galleryvm.json and inspect the joindomain and dscextension resource declarations. Compare their dependsOn expressions with the implementation in wvd-templates/Create and provision WVD host pool/mainTemplate.json, excluding its special case for index 0. Done means the declarations depend on only the VM they run on across the applicable nested templates.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.