lotas · GitHub

@lotas

…leted
Since Azure supports fast resource removal with the VM (`deleteOption:
'Delete'`) and our ARM templates are enforcing this, we could save some
time by not trying to deprovision each resource manually as before.
We also cannot rely/control what template is used, so we have to check
the actual VM model and NIC response from Azure when worker registers.
Only after checking that and making sure all resources are "cascadable"
we could short-circuit deprovision loop.
Deprovision now becomes: 1. delete VM. 2. if cascade exists, mark all
done.
This would skip NIC/IP/Disks steps
Additionally we log new metric and log type to see how it performs.
This should reduce total number of STOPPING workers that are usuallly
blocking worker-scanner-azure.

Read the original on github.com ↗