🐛 Refresh stale server address in registered runners 🐛

Runners registered when the container IP was the default kept that IP
in their .runner file. After a restart the IP pointed elsewhere, so
every Declare call timed out and no runner could connect. The address
is now rewritten to the current server address on each start.

- rootfs/usr/local/bin/start-runners: update the address field of an existing .runner to SERVER_ADDRESS when it differs, logging each change
- TODO.AI.md: record the cause, the fix and its verification
This commit is contained in:
casjay committed 2026-10-16 10:47:16 -04:00
1 parent 5602cfe9bd
commit 3a26334c70
2 files changed
+18

No files matched your search

+6
View File
@@ -151,6 +151,12 @@ __register_runner() {
return 1
fi
fi
# .runner stores the server address from registration; a container IP baked in earlier goes stale
# after a restart, so point it at the current SERVER_ADDRESS every start
if [ -f "$runner_dir/.runner" ] && ! grep -q -F -- "\"address\": \"$SERVER_ADDRESS\"" "$runner_dir/.runner"; then
__log "Updating $runner_name server address to $SERVER_ADDRESS"
sed -i "s|\"address\": *\"[^\"]*\"|\"address\": \"$SERVER_ADDRESS\"|" "$runner_dir/.runner"
fi
__log "Runner $runner_name registered"
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -