Open
Conversation
4f7f408 to
ff7d23a
Compare
56ff2f5 to
9711168
Compare
c759518 to
d34270d
Compare
jackfrancis
reviewed
Jan 15, 2026
Contributor
|
/retitle: azure: Zombie Node Cleanup |
Contributor
|
/release-note-edit /label tide/merge-method-squash |
40d3849 to
5f2060d
Compare
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alimaazamat The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
9c1db70 to
ee114fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
What this PR does / why we need it:
A customer had a cleanup script to cleanup "zombie nodes", non-functional Azure infra/Kubernetes nodes that are persisting in a Kubernetes cluster (and in the component state machines in cloud-provider-azure and CA). The customer has an old-fashioned script that looks for well-known "bad terminal states" of VMSS VMs and then deletes those. This PR implements that customer need into CA so that logic can be done from a point of authority.
azure_zombie_cleanup.gois the cleanup implementation:Key notes:
Updated:
When Cluster Autoscaler migreated to Track 2 Azure SDK we can now use
vm.TimeCreatedto populate the time within 2 seconds of VM creation versus Track 1'sstatus.Timewhich can take 1-1.5 minutes.Track 1: InstanceView.Statuses https://pkg.go.dev/github.com/Azure/azure-sdk-for-go@v68.0.0+incompatible/services/compute/mgmt/2022-08-01/compute#InstanceViewStatus
Track 2: TimeCreated https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5#VirtualMachineScaleSetVMProperties
Functions Implemented:
cleanupZombieNodes(): Main entry pointcleanupZombieNodesWithContext(nodes): Accepts K8s nodes for correlationevaluateZombieStatus(vm, k8sNodeMap, time, minAge): Returns (isZombie, hasK8sNode, reason)normalizeProviderID(providerID): Matches Azure IDs to K8s provider IDsThe implementation is called from
forceRefresh()inazure_manager.goruns every interval ofVmssCacheTTLInSeconds(default is 1min)Tests:
Scenario Detection Tests:
Helper Functions:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: