fix(update): watchdog health probe defaults to a port nothing listens on #1005

Closed
opened 2026-10-27 13:38:38 +00:00 by sam · 0 comments
Owner

scripts/archie-update-watchdog:15 defaults ARCHIE_HEALTH_URL to http://127.0.0.1:8420 and polls $HEALTH_URL/healthz. Nothing in the repo binds 8420: the dashboard's /healthz is on [web].listen (default 127.0.0.1:8484). scripts/archie-update-install:169 passes the same 8420 default through to the unit, so unless an operator exports ARCHIE_HEALTH_URL by hand, every dashboard- or Telegram-initiated self-update waits out ARCHIE_UPDATE_HEALTH_TIMEOUT (60s) and then rolls the daemon back, reporting health_check=failed on a release that actually came up fine.

Invisible to the suite: internal/releaseupdate/install_script_test.go fakes curl as 'exit 1' and sets ARCHIE_UPDATE_HEALTH_TIMEOUT=0, so only the unhealthy branch is ever exercised and the default URL is never dialled.

Acceptance criteria

Watchdog probes the address the dashboard actually serves /healthz on (derived from [web].listen, or an install-time value written into the unit). A test covers the healthy branch against a real listener so a wrong default fails the gate.

Notes

Found while reviewing archie-core-8cda.5.4/.5.5. Also bears on Phase 3: once the dashboard moves to archie-ui, whichever process the watchdog probes must be the one whose restart it is verifying -- probing the UI process would report success while archied is down.

Close reason

Fixed in cfb9fde. Daemon derives the probe URL from [web].listen and exports it through CommandInstaller; script default corrected to 8484. Healthy branch now covered against a real listener with the real curl, plus a test pinning the default. Web-off case tracked separately as archie-core-exbz.


Imported from beads archie-core-1r4g · GitHub #818 · type bug · priority P2 · created 2026-09-08 · closed 2026-09-09

scripts/archie-update-watchdog:15 defaults ARCHIE_HEALTH_URL to http://127.0.0.1:8420 and polls $HEALTH_URL/healthz. Nothing in the repo binds 8420: the dashboard's /healthz is on [web].listen (default 127.0.0.1:8484). scripts/archie-update-install:169 passes the same 8420 default through to the unit, so unless an operator exports ARCHIE_HEALTH_URL by hand, every dashboard- or Telegram-initiated self-update waits out ARCHIE_UPDATE_HEALTH_TIMEOUT (60s) and then rolls the daemon back, reporting health_check=failed on a release that actually came up fine. Invisible to the suite: internal/releaseupdate/install_script_test.go fakes curl as 'exit 1' and sets ARCHIE_UPDATE_HEALTH_TIMEOUT=0, so only the unhealthy branch is ever exercised and the default URL is never dialled. ### Acceptance criteria Watchdog probes the address the dashboard actually serves /healthz on (derived from [web].listen, or an install-time value written into the unit). A test covers the healthy branch against a real listener so a wrong default fails the gate. ### Notes Found while reviewing archie-core-8cda.5.4/.5.5. Also bears on Phase 3: once the dashboard moves to archie-ui, whichever process the watchdog probes must be the one whose restart it is verifying -- probing the UI process would report success while archied is down. ### Close reason Fixed in cfb9fde. Daemon derives the probe URL from [web].listen and exports it through CommandInstaller; script default corrected to 8484. Healthy branch now covered against a real listener with the real curl, plus a test pinning the default. Web-off case tracked separately as archie-core-exbz. --- _Imported from beads `archie-core-1r4g` · GitHub #818 · type bug · priority P2 · created 2026-09-08 · closed 2026-09-09_
sam added the mediumbug labels 2026-10-27 13:38:38 +00:00
sam self-assigned this 2026-10-27 13:38:38 +00:00
sam closed this issue 2026-10-27 13:38:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1005