Skip to content

Commit 03ed777

Browse files
Spencer Bryngelsonclaude
andcommitted
refactor: remove superseded restart-offline-runners.sh, update READMEs
restart-offline-runners.sh is superseded by rebalance-runners.sh, which handles offline runners as part of its distribution algorithm and also calls sync_runner_nodes to self-heal stale runner.node files. Update frontier/README.md: remove restart-offline-runners.sh references, replace CWD-based discovery language with EXE-based, add rebalance-runners.sh. Update phoenix/README.md: fix config.sh description (functions now in runner-lib.sh), fix list-runners.sh description (now parallel sweep), fix slurm PATH wording (portable grep, not /opt/slurm). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0992785 commit 03ed777

3 files changed

Lines changed: 24 additions & 120 deletions

File tree

misc/frontier/README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,38 @@ starting it on another — no binary copying needed.
1414
Each runner directory contains a `runner.node` file recording which login node
1515
it was last started on. This is used as a fallback hint when restarting offline
1616
runners. The authoritative source of truth for whether a runner is running (and
17-
on which node) is CWD-based process discovery — not any PID file.
17+
on which node) is EXE-based process discovery via `/proc/$pid/exe` — not any
18+
PID file.
1819

19-
`runner.node` is self-healing: `restart-offline-runners.sh` detects when a
20-
runner is actually running on a different node than `runner.node` records (e.g.
21-
after a manual restart) and corrects the file automatically.
20+
`runner.node` is self-healing: `rebalance-runners.sh` calls `sync_runner_nodes`
21+
at startup, which sweeps all nodes in parallel and corrects any stale
22+
`runner.node` files automatically.
2223

2324
Runners occasionally die due to OLCF's firewall/proxy dropping long-lived TCP
24-
connections to GitHub's broker. The `restart-offline-runners.sh` script handles
25-
recovery. Login nodes vary in stability — if a runner keeps dying on a
25+
connections to GitHub's broker. Run `rebalance-runners.sh` to restart and
26+
redistribute them. Login nodes vary in stability — if a runner keeps dying on a
2627
particular node, move it to a quieter one (login01 tends to have low load).
2728

2829
## Quick Reference
2930

3031
```bash
31-
# List all runners with GitHub status, node, and memory usage
32+
# List all runners with GitHub status, node, slurm, and memory usage
3233
bash list-runners.sh
3334

3435
# Check runner health across all login nodes
3536
bash check-runners.sh
3637

38+
# Restart offline runners and rebalance across all 11 nodes
39+
bash rebalance-runners.sh # dry run
40+
APPLY=1 bash rebalance-runners.sh # execute
41+
APPLY=1 FORCE=1 bash rebalance-runners.sh # move busy runners too
42+
3743
# Deploy a new runner on a specific node
3844
bash make-runner.sh 23 login01
3945

4046
# Deploy multiple runners across nodes (e.g. runners 23, 24, 25)
4147
bash deploy-runners.sh 23 login01 login02 login03
4248

43-
# Restart all offline runners in place
44-
bash restart-offline-runners.sh
45-
4649
# Move a runner to a different login node
4750
bash move-runner.sh frontier-1 login01
4851

@@ -58,14 +61,14 @@ APPLY=1 bash ../common/rerun-failed.sh
5861

5962
| Script | Purpose |
6063
|---|---|
61-
| `config.sh` | Shared configuration, constants, GitHub API helpers, and CWD-based process management functions. Sourced by all other scripts. |
62-
| `check-runners.sh` | SSH to each login node, show Runner.Listener processes with name, status (idle/BUSY), and RSS memory. |
63-
| `list-runners.sh` | List all runners with GitHub API status, actual node (from parallel SSH sweep), and RSS memory. Flags stale `runner.node` entries. |
64+
| `config.sh` | Shared configuration: Frontier constants, `find_runner_dirs()`, and `sync_runner_nodes()`. Sources `../common/runner-lib.sh` for shared functions. |
65+
| `check-runners.sh` | SSH to each login node, show Runner.Listener processes with name, status (idle/BUSY), slurm PATH, and RSS memory. |
66+
| `list-runners.sh` | List all runners with GitHub API status, actual node (from parallel SSH sweep), slurm status, and RSS memory. Flags stale `runner.node` entries. |
67+
| `rebalance-runners.sh` | Sync node locations, compute optimal distribution, and move runners across all 11 login nodes. Handles offline runners. Dry run by default. |
6468
| `make-runner.sh` | Download runner binary, register with GitHub via API, start on target node. Usage: `make-runner.sh <num> [login-node]` |
6569
| `move-runner.sh` | Move a runner to a different login node: stop on current node, update `runner.node`, start on target. Usage: `move-runner.sh <runner-name> <target-node>` |
6670
| `deploy-runners.sh` | Deploy multiple runners across login nodes in parallel. Usage: `deploy-runners.sh <start-num> <node1> [node2 ...]` |
67-
| `restart-offline-runners.sh` | Query GitHub for offline frontier runners, locate via CWD-based discovery, stop stale processes, then restart in parallel. Self-heals stale `runner.node` files. Prints final status. |
68-
| `stop-runner.sh` | Locate runner via CWD-based discovery, stop the process, and deregister from GitHub. Usage: `stop-runner.sh <runner-name>` |
71+
| `stop-runner.sh` | Locate runner via EXE-based discovery, stop the process, and deregister from GitHub. Usage: `stop-runner.sh <runner-name>` |
6972
| `../common/rerun-failed.sh` | Rerun failed GitHub Actions workflows on open PRs and master. No site-specific code. |
7073

7174
## Troubleshooting
@@ -77,9 +80,9 @@ bash move-runner.sh frontier-1 login01
7780
```
7881

7982
**Multiple runners OFFLINE at once** — Usually a transient OLCF network blip
80-
to GitHub. Run `restart-offline-runners.sh` to recover all at once.
83+
to GitHub. Run `rebalance-runners.sh` to recover and redistribute all at once.
8184

8285
**Runner appears offline on GitHub but process is running** — GitHub status can
83-
lag. `restart-offline-runners.sh` uses CWD-based process discovery first: if a
86+
lag. `rebalance-runners.sh` uses EXE-based process discovery first: if a
8487
process is found running, it will stop it before restarting, preventing
8588
duplicate runner processes.

misc/frontier/restart-offline-runners.sh

Lines changed: 0 additions & 99 deletions
This file was deleted.

misc/phoenix/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ APPLY=1 bash rerun-failed.sh # execute
4747

4848
| Script | Purpose |
4949
|---|---|
50-
| `config.sh` | Shared config: Phoenix constants (`ORG`, `RUNNER_GROUP`, `RUNNER_LABEL`, `NODES`), GitHub API helpers (`gh_list_runners`, `gh_registration_token`), and process management (`start_runner`, `stop_runner`, `find_node`, `find_pids`, `has_slurm`). |
51-
| `check-runners.sh` | Quick per-node health check. One SSH per node. Shows runner names, idle/BUSY status, slurm PATH, RSS, and total memory. |
52-
| `list-runners.sh` | Detailed table combining GitHub API status (online/offline/busy) with login-node process info. Slower (one SSH per runner + API call). |
50+
| `config.sh` | Shared config: Phoenix constants (`ORG`, `RUNNER_GROUP`, `RUNNER_LABEL`, `NODES`, `CGROUP_LIMIT`, `RUNNER_PARENT_DIRS`) and `find_runner_dirs()`. Sources `../common/runner-lib.sh` for shared functions. |
51+
| `check-runners.sh` | Quick per-node health check. One SSH per node. Shows runner names, idle/BUSY status, slurm PATH, RSS, and total cgroup memory. |
52+
| `list-runners.sh` | Table combining GitHub API status with live node info from a parallel SSH sweep. Shows slurm status and flags stale `runner.node` entries. |
5353
| `restart-runner.sh` | Stop and restart one runner on a given node with proper login shell PATH and SSH detachment. |
5454
| `restart-all.sh` | Restart all runners in place. Skips BUSY runners unless `FORCE=1`. |
5555
| `rebalance-runners.sh` | Auto-compute optimal distribution and move runners. Prefers idle runners. Also places OFFLINE runners. |
@@ -61,7 +61,7 @@ APPLY=1 bash rerun-failed.sh # execute
6161
- **Dry run by default**: `rebalance-runners.sh`, `restart-all.sh`, and
6262
`rerun-failed.sh` show what they would do unless `APPLY=1` is set.
6363
- **Busy runner protection**: Scripts skip BUSY runners unless `FORCE=1`.
64-
- **Slurm PATH verification**: After starting, scripts verify `/opt/slurm` is
64+
- **Slurm PATH verification**: After starting, scripts verify `slurm` appears
6565
in the runner's PATH and warn if missing.
6666

6767
## Configuration

0 commit comments

Comments
 (0)