Investigate and diagnose Dangling DIsks on Azure after VM/shoot deletion.
elankath opened this issue · comments
What happened:
After VM Deletion / Shoot Deletion there are still disks left on azure. Orphan collection doesn't work as the MCM is scaled down after the final machine obj is removed during shoot deletion
Background: Live Issue 2263 on internal kubernetes-live
We noticed that when cluster is deleted in Gardener it does not delete disks, leaving them in unattached state. The assumption was that once the cluster is deleted all related resources are also deleted (including the resource group), otherwise we are paying for unused resources and also this can causes new clusters being blocked in creation.
- Solve this issue after #91
What you expected to happen:
Deletion of unused disks when cluster is deleted.
How to reproduce it (as minimally and precisely as possible):
- Create a machine obj, stop it from deletion by adding a custom finalizer, trigger the machine obj deletion
- Perform the shoot deletion
- add some disks with
role
tag andcluster
tag used by MCM - remove the finalizer
Now notice if MCM removes those disks , sometimes it won't remove them using orphan colleciton.
Anything else we need to know:
Environment:
Post grooming
This is to track progress cascade create/ delete in Azure.
/close as cascade delete is being done