You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CASCL-1386] Implement node drain primitives and ASG eviction
Part of a stack splitting #3026 (too large to review in one piece) into
small pieces that each build and pass tests on their own. The command is
fully functional only once the whole stack lands.
log.Printf("Warning: node %s has unexpected providerID %q; its instance will be terminated by the final scale-to-zero instead", nodeName, node.Spec.ProviderID)
log.Printf("ASG %s: at least one node failed to cordon, drain, or terminate; leaving the ASG at MinSize=0 without locking MaxSize. Re-run after addressing the errors above.", asgName)
63
+
returnerrors.Join(errs...)
64
+
}
65
+
66
+
// Every node drained and its instance was terminated. Lock the ASG at
67
+
// min=max=desired=0 so nothing is ever relaunched, and to clean up any
68
+
// instance that couldn't be terminated per-node (unexpected providerID).
69
+
ifdrainOpts.DryRun {
70
+
log.Printf("[dry-run] would scale ASG %s to min=max=desired=0", asgName)
71
+
returnnil
72
+
}
73
+
// All instances are now terminated; only the MaxSize=0 lock remains. A
74
+
// crash here would leave the ASG at desired=0 but unlocked and no longer
75
+
// rediscoverable by a re-run (see the crash-window note on evictASG).
76
+
log.Printf("ASG %s: all nodes drained; locking the ASG at min=max=desired=0.", asgName)
0 commit comments