Repository navigation
fence(kaneo): pin pm-kaneo.service+timer in the failover fence (#3989) - #15986
Conversation
The Kaneo compose stack is managed by the pm-kaneo user service and its 30 min retry timer (deploy.sh runs compose up). fence-check covered the kaneo/postgres containers but no manager unit, so a stopped-container state reported FENCED while the manager could revive the writer on its next run or timer elapse -- the promote gate would pass against a live writer. Stores all/kaneo now require pm-kaneo.service and pm-kaneo.timer inactive; runbook step 1 and the migration plan name the stop order. New fixture tests prove the hole on the old rule and the refusal on the new one.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Lane 0107-F (charlie ADVANCE, verify-then-merge): claim-scan clean (no lane-log/lane-failures claim; sole prior comment CodeRabbit skip 7212251769; 0 reviews). Body + full diff read (161 lines, 5 files: fence-check.sh writer-unit set, fence-check.test.sh +3 oracle checks, kaneo-cutover.test.sh fixtures, runbook + migration plan docs — matches body, not docs-only). No passing run on exact head 246eba2 (code Actions 0, dezren39/fleet 0, developing-today/fleet 0; check-runs CodeRabbit/Proof skipped only). Dispatching ONE fleet-command run pinned to exact head, command: bash pm-stack/scripts/fence-check.test.sh && bash pm-stack/scripts/kaneo-cutover.test.sh && bash pm-stack/scripts/grist-pad-sync.test.sh && bash pm-stack/scripts/ownership-map.test.sh (dispatch_id 0107F-15986). Merge follows only on success + fresh OPEN/non-draft/CLEAN/MERGEABLE. Key: 0107-F |
|
MERGED by lane 0107-F (charlie ADVANCE, verify-then-merge) — merge commit 7122952, merged_at 2026-11-27T07:32:45Z, verified MERGED by second read (gh api pulls: state=closed, merged=true, head unchanged 246eba2). Evidence (firsthand, gh CLI only): body + ALL comments (sole CodeRabbit skip 7212251769; 0 reviews, 0 review comments) + full diff read (161 lines, 5 files, matches body, not docs-only). Dispatched ONE fleet-command run 45958122744 https://github.com/dezren39/fleet/actions/runs/45958122744 (dispatch_id 0107F-15986, ref pinned to exact head) — completed SUCCESS; Linux job 140369310938 log: "Target HEAD: 246eba2" exact, and all four suites passed: fence-check.test.sh: all checks passed / kaneo-cutover.test.sh: all checks passed / grist-pad-sync.test.sh: all checks passed / ownership-map suite passed. Fresh pre-merge read: OPEN/non-draft, mergeable=true, mergeable_state=clean at exact head. Key: 0107-F |
Summary
Closes no issue; next slice of #3989 (criterion 3: the old writer is fenced before failover promotion).
The Kaneo compose stack is managed by the
pm-kaneouser service and its 30 min retry timer (deploy.shrunscompose up).fence-check.shcovered the kaneo/postgres containers but no manager unit, so containers-stopped reported FENCED while the manager could revive the writer on its next run or timer elapse — the promote gate would pass against a live writer. Storesall/kaneonow requirepm-kaneo.serviceandpm-kaneo.timerinactive; runbook step 1 andSTORE-MIGRATION-PLAN-6816.md§3 name the stop order.Evidence
Before (base
origin/main, manager service active, all containers stopped) — the hole:After (this branch, same fixtures):
Suites (sandbox, fixture/stub mode only — no docker, no live host):
pm-stack/scripts/fence-check.test.sh: all checks passed (13 existing + 3 new)pm-stack/scripts/kaneo-cutover.test.sh: all checks passed (fixtures extended with the two units)pm-stack/scripts/grist-pad-sync.test.sh: all checks passed (uses--store grist|pad, unaffected)pm-stack/scripts/ownership-map.test.sh: suite passedMerge Danger
Low. Fail-closed direction only: previously-FENCED states with a live manager now report UNFENCED. Any operator flow that relied on containers-only fencing for Kaneo (cutover promote/rollback via
kaneo-cutover.sh) must now alsosystemctl --user stop pm-kaneo.service pm-kaneo.timerfirst — that is the documented step 1 order. Grist/Pad paths are untouched (--store grist|padwriter sets unchanged). Live systemd behavior (user-bus reads) is not exercised here; the laptop lane or nightlypm-stack-tests.ymlcovers it.{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-27T07:12:36Z", "session_id": "ses_e5de43207caffeyUkhxYf67B4d", "lane": null, "host": "amd", "worktree": "/home/user/git/fleet/code-h-3989-20261127T070505Z-a70238af", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/git/fleet/code-h-3989-20261127T070505Z-a70238af", "repo": "developing-today/code", "branch": "code-h/3989-pm-host-portability", "sha": "246eba2da3f547e5ff0e1ba4e352a7f8d2263036" }, "auth_subject": "oc-code-03", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.