Repository navigation
feat(scuttle): retry PDB-blocked evictions until a drain timeout - #156
Merged
anthr76 merged 3 commits intoOct 25, 2026
Merged
Conversation
anthr76
merged commit Oct 25, 2026
8b3b315
into
fix/scuttle-clear-pods-after-kubelet
21 of 26 checks passed
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.
Why
scuttle v0.1.0 (the only release; upstream has only had dependency bumps since) drains with a single pass: it evicts pods one by one, returns on the first error, and never waits for evicted pods to terminate.
scuttle.stopthen deletes the Node regardless. A PodDisruptionBudget refusal therefore aborts the drain (Oct 22:grafana-pg-1, ~1s in), everything after it is never evicted, and Ceph OSDs/mons, CNPG primaries etc. are killed as if the node crashed. Rook never sees a blocked drain, so it never sets per-hostnooutor tightens the other hosts' OSD PDBs, and nothing stops a second host from going down.Changes
pkgs/scuttle/drain-timeout.patch(applied viapatches):-drain-timeoutflag (default0= upstream single pass, so the patch is upstreamable as-is).Drainloops every 5s: re-lists pods on the node, evicts each one not already terminating, treats 429 (PDB) and other errors as retryable, and returns only when no evictable pods remain or the timeout expires.policy/v1Eviction API (EvictV1) instead ofpolicy/v1beta1.services.scuttle.drainTimeout(seconds, default 600) is passed as-drain-timeout, andTimeoutStopSecbecomesdrainTimeout + 120(720s by default).Stacked on #155 (same module).
Verification
go.sumentries): an eviction blocked by a PDB 3 times succeeds on attempt 4; an always-blocked eviction returns a timeout error; timeout 0 makes one attempt and returns the PDB error.go vetclean./nix/store/rd613kz54bximam9i40rabwnfjl7pj50-scuttle-0.1.0, andscuttle -helplists-drain-timeout.nix evalof worker-3: script passes-drain-timeout=600s,TimeoutStopSec=720.systemctl restart docker-kubelet(or reboot), then watchjournalctl -u scuttleforeviction blocked, will retry→drained node, and check that Rook setsnoouton that host (ceph osd dump | grep flags,ceph health detail).Notes
restartIfChanged = false(fix(scuttle): don't restart scuttle on switch (it deletes the Node) #154), so deploying this takes effect at the next kubelet restart or reboot.