Skip to content

ci: arm64 self-hosted runner auto-reregister watchdog - #923

Merged
frstrtr merged 3 commits into
masterfrom
macos-ci-steward/arm64-runner-watchdog
Jul 27, 2026
Merged

ci: arm64 self-hosted runner auto-reregister watchdog#923
frstrtr merged 3 commits into
masterfrom
macos-ci-steward/arm64-runner-watchdog

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Ports runner-watchdog-mac-intel.sh to the Apple Silicon node Mac-mini-Alonso-227 (labels self-hosted,macOS,ARM64,c2pool-mac-arm).

Why: arm64 is a required release leg (the macOS universal package lipo-merges arm64 + x86_64). Only the Intel node self-healed a server-side deregistration; the arm64 runner had no auto-reregister — an unguarded single point of failure on every release.

Design (identical to the Intel sibling): idempotent, non-destructive. Polls the runners API; after THRESHOLD consecutive offline observations, mints a fresh registration token and re-registers via config.sh --replace (reuses the same name, no delete) over SSH, then reloads the launchd service. Fail counter clears the moment the runner is seen online.

Drop test (real, on .227): service stopped -> runner offline -> watchdog re-registered unattended -> came back online -> picked up a job. Evidence in thread.

Revert: delete scripts/ci/runner-watchdog-mac-arm.sh + its bridge cron entry. Never deletes the runner.

macos-ci-steward added 3 commits July 27, 2026 08:11
Port runner-watchdog-mac-intel.sh to the Apple Silicon node
(Mac-mini-Alonso-227, labels self-hosted,macOS,ARM64,c2pool-mac-arm).
arm64 is a required release leg (macOS universal lipo-merge); until now
only the Intel node self-healed a server-side deregistration, leaving the
arm64 runner as an unguarded single point of failure. Same idempotent,
non-destructive design: polls the runners API, and after THRESHOLD
consecutive offline checks mints a fresh registration token and
re-registers via config.sh --replace (no delete) over SSH.

Revert: delete scripts/ci/runner-watchdog-mac-arm.sh + its bridge cron entry.
…nd config.sh --replace

Drop test on .227 showed config.sh refuses to reconfigure while the
launchd service is still installed (config.sh remove -> "Uninstall
service first"; --replace -> "already configured"). Stop alone is not
enough. Correct flow: svc.sh stop -> svc.sh uninstall -> config.sh
--replace -> svc.sh install -> svc.sh start. Still idempotent, no delete.
A real .227 drop test showed the naive port (mirroring the untested Intel
sibling) cannot self-heal:
 - launchd LaunchAgents must be managed in the user GUI domain over SSH
   (launchctl bootout/bootstrap gui/$UID); svc.sh install/uninstall alone
   fail with Input/output error from a non-GUI session.
 - config.sh --replace does not bypass the local already-configured guard;
   a real unconfigure (config.sh remove / wipe .runner+.credentials) must
   precede a fresh configure.
Sequence is now: bootout+uninstall -> remove-token unconfigure -> fresh
config.sh configure -> svc install + bootstrap+kickstart into gui/$UID.
Non-destructive: re-registers under the same name/labels; no orphan delete.
frstrtr added a commit that referenced this pull request Jul 27, 2026
Ports the three fixes proven by the .227 arm64 drop test (PR #923) onto
the Intel node's runner-watchdog: manage the launchd LaunchAgent in the
gui/$UID domain, use config.sh remove (not --replace) before a fresh
configure, and mint a remove-token to deregister server-side. Drop test
on .204 is UNVERIFIED pending SSH access restoration.
@frstrtr
frstrtr merged commit 767afe7 into master Jul 27, 2026
46 of 47 checks passed
frstrtr added a commit that referenced this pull request Jul 28, 2026
…924)

Ports the three fixes proven by the .227 arm64 drop test (PR #923) onto
the Intel node's runner-watchdog: manage the launchd LaunchAgent in the
gui/$UID domain, use config.sh remove (not --replace) before a fresh
configure, and mint a remove-token to deregister server-side. Drop test
on .204 is UNVERIFIED pending SSH access restoration.
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