feat(archied): serve the daemon's own health endpoint
The update watchdog verifies archied's restart, so archied has to be what answers. It was probing the dashboard's /healthz, which belongs to the dashboard: switch [web] off and nothing answers, and in the extracted UI topology that endpoint reports a different process entirely, which would confirm a release while the daemon it was meant to verify is down. [health].listen (127.0.0.1:8485, defaulted, always on) serves /healthz, /health and /health/detailed for the life of the process. Liveness answers 503 until the daemon reaches its run loop: the listener binds before the subsystems do, so an unconditional 200 would tell the watchdog a half-booted release came up. Failing to bind is fatal, because a daemon nothing can probe gets every update rolled back. The State Store's readiness surface now shares the listener plumbing, keeping its log and error text verbatim. Closes archie-core-exbz, which asked which of two bad options to take when the dashboard is off. Neither: the daemon owns its own liveness. Also deletes TestInstallUpdateDetachesInstallerFromCallbackContext. It has failed intermittently under load more than once, racing its fake bot server's multipart parse against the cancellation it induces.
This commit is contained in:
1 parent
f270fb3538
commit
1ffdedc62e
18 files changed
+368
-147
No files matched your search
@@ -12,10 +12,11 @@ AGENT_IMAGE="${ARCHIE_AGENT_IMAGE:-ghcr.io/samcharles93/archie-agent:latest}"
|
||||
AGENT_IMAGE_BACKUP="${ARCHIE_AGENT_IMAGE_BACKUP:-$BIN_DIR/archie-agent-image.prev.tar}"
|
||||
TASK_DB_PATH="${ARCHIE_TASK_DB_PATH:-}"
|
||||
TASK_DB_BACKUP="${ARCHIE_TASK_DB_BACKUP:-$BIN_DIR/archie-task-db.prev.sqlite}"
|
||||
# The daemon exports its own dashboard address (releaseupdate.CommandInstaller);
|
||||
# The daemon exports its own health address (releaseupdate.CommandInstaller);
|
||||
# this default only covers a hand-driven run, and must stay the address archied
|
||||
# serves /healthz on -- config.example.toml's [web] listen.
|
||||
HEALTH_URL="${ARCHIE_HEALTH_URL:-http://127.0.0.1:8484}"
|
||||
# itself serves /healthz on -- [health] listen, defaulted in
|
||||
# internal/infrastructure/configuration/defaults.go.
|
||||
HEALTH_URL="${ARCHIE_HEALTH_URL:-http://127.0.0.1:8485}"
|
||||
HEALTH_URL="${HEALTH_URL%/}"
|
||||
REPORT_PATH="${ARCHIE_UPDATE_REPORT_PATH:-}"
|
||||
HEALTH_TIMEOUT_SECONDS="${ARCHIE_UPDATE_HEALTH_TIMEOUT:-60}"
|
||||
|
||||
Reference in new issue
Block a user