feat(healthcheck): decouple host liveness from the self-update loop#34
Merged
Conversation
The healthcheck (script, service, timer) now installs with standalone.manage, so a standalone host without the self-update loop still monitors its manager service and rootless docker daemon. The loop-supervision checks (apply-timer state, checkout staleness, and a new bootstrap-gem assertion) render into the script only under self_update.manage. runner_account.uid is now required wherever the healthcheck installs (standalone.manage).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14.
Summary
The host healthcheck previously installed only with the self-update loop (
standalone.self_update.manage), so a standalone host that applies manually rather than on a timer had zero health monitoring. This splits the healthcheck into two layers: liveness, which installs on any declared-standalone host, and loop supervision, which layers on only where the self-update loop drives convergence. One script, one timer, no new toggle.What changed
The healthcheck script, service, and timer now install under
standalone.managealongside the apply script.templates/healthcheck.sh.epprenders an always-present liveness section (manager service active, rootless docker user unit active,docker infoas the runner user) and, only whenself_update.manageis true, a supervision section (apply timer enabled and armed, checkout staleness against origin, and a new assertion that the bootstrap gemsr10kandhiera-eyamlare present in the AIO Ruby). The staleness check stays loop-gated because a manually-applied host is legitimately behind origin between applies.runner_account.uidis now required wherever the healthcheck installs (standalone.manage), since the liveness probe derives the rootless runtime paths from it. The daemon-reload exec that the healthcheck units need moved up understandalone.manageand is retitled accordingly; the apply units keep notifying it (sound becauseself_update.manageimpliesstandalone.manage). Unit names and the script path are unchanged.Behavior
Testing
just checkis green (validate, lint, 125 rspec examples, docs-check). Catalog tests cover all three states: no standalone (nothing installed), standalone without the loop (healthcheck installed, rendered script contains liveness only), and standalone with the loop (full script, including the gem assertion). The rendered-script split and the moved uid guard are each mutation-checked. The golden healthcheck fixture is regenerated from the template.Docs
README.md.REFERENCE.md.CHANGELOG.mdentry under "Changed" describing the consumer-visible behavior.