fix: the watchdog's timer is enabled only in a real run (CP-41) #18
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-cockpit!18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/watchdog-timer-check-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The deploy of #17 reached the service step's check run and failed on its last task:
The timer unit is written by the same run that enables it, and check mode writes nothing — so
systemctl enablehad no unit to find. The task carried the server unit's condition (not ansible_check_mode or semaphore_installed), which is correct for a unit the Guest already has and wrong for a new one: on an upgrade the package is installed, the task runs, and the rehearsal that gates the deploy goes red before anything changes.One line:
when: not ansible_check_mode, with the reason beside it.Evidence
snapshot(predeploy-20261105-161801) andguesthad gone green. 143 was not otherwise changed: still the previous binary, no watchdog unit.After: the deploy's own gate, run against 143 —
site.yml --check --diffendssemaphore : ok=28 changed=10 unreachable=0 failed=0 skipped=9. The ninth skip is this task; before the fix it ran and failed.make checkgreen; the playbook file parses.Merge Danger
Door: two-way — a revert restores a deploy that fails in its rehearsal.
Blast Radius: one
whenin the watchdog's last task. Merging this is what re-runs the deploy ofmain, and the merge that should land 143 on the community build.Review started (round 1/5) on
c3fb77e737— reading the diff now.repo=olympus/infra-cockpit pr=18 head=c3fb77e737ae3fa62173b5327b0cbc18a6efc7bd round=1/5 verdict=merge
Reviewed head
c3fb77e737(resolved fromrefs/pull/18/headon the host; equals the dispatch SHA). Round 1 of 5: no earlier review on the thread, so the whole head is reviewed; the dispatch's1/5and the thread's count agree.Recommendation: merge
Verdict: no blocker, one advisory. Merge.
Spec
Source: the PR body (CP-41 is named in it) and the CP-41 ticket (Vikunja project 11, index 41), read live. The ticket carries the watchdog (timer every 15 minutes) and its
--checkacceptance; this PR is the follow-up to the deploy that ticket's #16 produced. The PR's own claim is the contract: the watchdog's timer task must not fail the check-mode rehearsal on an upgrade, and must still run in a real run.Diff: one file,
semaphore/service/roles/semaphore/tasks/watchdog.yml, +9/-1: thewhen:of the last task changes fromnot ansible_check_mode or semaphore_installedtonot ansible_check_mode, plus a comment.--checkon a Guest that has the package but no timer unit, the old condition fails withCould not find the requested service semaphore-watchdog.timer: host7841fb7task,semaphore_installed=true,--check, no such unit on the host:fatal ... Could not find the requested service semaphore-watchdog.timer: host, rc=2. Same sentence as run 36.when: not ansible_check_modeclears itskipping: [localhost], rc=0 (failed=0 skipped=1).not check or installed; new:not check. Withansible_check_mode=falseboth are true, so a real run's behaviour is unchanged. The only input where the two differ is check mode withsemaphore_installed=true, and that is the case being fixed.tasks/main.yml:152,:172,:211,:226and the handler (handlers/main.yml:4) keepor semaphore_installedfor a unit an installed Guest already has (semaphore.serviceis written atmain.yml:201and enabled at:211). The timer is written bywatchdog.ymlitself, so only the timer is new on an upgrade.make checkgreenplan tests: every case passed.andtofu fmt -recursive -check -diffclean.pr-checksruns 37 and 38 forc3fb77ebothsuccess.site.yml --check --diffagainst 143 endsok=28 changed=10 unreachable=0 failed=0 skipped=9No spec-axis blocker. Scope: the PR touches the one task it names; nothing else moved.
ADVISORY (S1) —
semaphore/service/tests/ha/rehearsal.sh:2-4,docs/deploy.md:173-175: nothing automated rehearses the upgrade shape that escaped. The role's only--checkrehearsal runs against "a fresh scratch guest ... nothing of Semaphore installed" (rehearsal.sh:2-3), wheresemaphore_installedis false and the old condition skipped the timer task, so #16's green rehearsal could not see this defect and the first sight of it was the PROD deploy gate. After this fix the same blind spot remains for the next task copied from the server'sor semaphore_installedpattern. A case with the package present and the units absent (a second container state, or the fixture of the probe used here) would close it. Not a blocker: no repo rule requires it, and this PR's fix is verified.Standards
Sources read from the head worktree:
AGENTS.md(Rules, Toolchain, Docs, Pull requests),docs/agents/issue-tracker.md,docs/deploy.md. There is nodocs/adr/in this repo (AGENTS.md says so); the org ADRs live inolympus/workshopand none bears on a one-linewhen:in a role task.AGENTS.md§Pull requests, "Name the task a pull request addresses in its body asCP-<index>"AGENTS.md§Toolchain:make checkis the PR gateAGENTS.md§Toolchain: a merge tomainis a deploymain"); the door is two-way, which matches the one-linewhen:.AGENTS.md§Secretsno_logwhere they carry one.docs/deploy.md§The watchdog (lines 104-126) states nothing about the timer in a check run, so no sentence is falsified by the change.No standards-axis finding.
Verified, and how
git ls-remote origin refs/pull/18/head=c3fb77e737ae3fa62173b5327b0cbc18a6efc7bd, equal to the dispatch SHA and the local pull ref;git diff --stat 7841fb7 HEAD= one file;7841fb7(currentorigin/main) is an ancestor of head.ansible-playbook --checkon a host whosesystemctl show semaphore-watchdog.timeranswersLoadState=not-found, withsemaphore_installed=true. Output kept undercache/scratch/infra-cockpit-18-r1/(base-check.out,head-check.out).mise exec -- make checkat head, rc=0 captured before any pipe;git status --porcelainclean afterwards.Unverified, and why
ok=28 ... skipped=9, "the ninth skip is this task"): needs the live Guest and the Operator's environment. The skip itself is proved above; the count of 9 is the author's.Named, not charged
--checkruns skip this task entirely, so a timer disabled by hand is not reported by the rehearsal. The same is true of everynot ansible_check_modetask inmain.yml(:81,:89,:99,:107,:118) and is the cost of the choice the PR makes; it is not a defect in the change.Summary
Total advisories: 1, below the volume threshold of three. The state follows the blockers (none): APPROVE,
review/merge-ready.