Repository navigation
Cluster manager: decide on a worker's current row before terminating it; release 0.21.1 - #107
Merged
Merged
Conversation
…it; release 0.21.1 The manager reads the workers once per cycle, starts pods, and then terminates workers whose ping in that list is older than two minutes. Starting pods can take minutes when RunPod refuses (GPU quota used up, about ten seconds per attempt), so after a slow cycle every healthy worker looked unresponsive. On 2026-11-25 this terminated all workers of one organization at once, three times in two hours; their runs show as failed without a log. clean_up_workers now reads a worker's row again before terminating it and decides on that. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Problem
One organization had many runs that failed without a log, with metrics up to the moment they stopped. The manager's log shows it terminated every worker of that organization at once, three times on 2026-11-25 (10:32, 11:43, 12:40 UTC), more than 40 workers each time. At 10:32 each had "no ping for 129-134 seconds".
Each cycle the manager reads the workers once (
get_running_workers), then starts pods (scale_workers), then terminates workers that stopped pinging (clean_up_workers). The last step compared the current time with the pings in the list from the start of the cycle. With many pending jobs and RunPod refusing pods (GPU quota used up, about ten seconds per attempt), the cycle before 10:32 took over two minutes, so every healthy worker looked overdue by the age of the list. The five-second spread of the reported ages is the workers' ping interval.Change
clean_up_workersreads a worker's row again before terminating it and decides on that. One more query per worker that looks overdue, none otherwise. A worker terminated in the meantime is skipped.Version 0.21.1, notes in
docs/release-0.21.1.md. No migration, no new images.Related: #82 describes healthy workers being reaped two minutes after their "last ping" and proposes consulting the pod's log. This is likely the cause of at least the mass incident described there; that change is not included here.
Test
Three new cases in
tests/test_credential_safety.py(overdue in the list but pinged since: kept; still overdue: terminated; already terminated: skipped). Not verified against a real manager under load before release.🤖 Generated with Claude Code