Skip to content

Cluster manager: decide on a worker's current row before terminating it; release 0.21.1 - #107

Merged
nielsrolf merged 1 commit into
mainfrom
stale-worker-list-cleanup
Nov 25, 2026
Merged

nielsrolf merged 1 commit into
mainfrom
stale-worker-list-cleanup

Conversation

@nielsrolf

Copy link
Copy Markdown
Collaborator

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_workers reads 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

…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>
@nielsrolf
nielsrolf merged commit 1ea0b4b into main Nov 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant