Deploy the runner Guest with the server's, and snapshot it first (CP-42) #25
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!25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/cp42-prod-runner"
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?
CP-42's last criterion: the next merge deploys both Guests and leaves a
predeploy-*snapshot on 143 and on 145. The service layer already configured both throughsite.yml. The Guest step and the snapshot covered 143 alone.Summary
runner-snapshothas still changed nothing.runner-snapshotuses the same script, name shape and prune as the server's snapshot. The prune counts per Guest, so each keeps its own newest three.guest_identitytakes the Stack's directory as an optional third argument. It defaults tosemaphore/guest, so every existing caller is unchanged.RUNNER_GUEST_IDENTITY := runner_identityis new. Nothing defined it before.deploy.yml(comments and the step name) anddocs/deploy.md(the step list) are updated to match.Evidence
make -n prod NONINTERACTIVE=1showssnapshot,runner-snapshot,guest,runner-guest,service,verify. Both runner steps exportRUNNER_STATE_AWS_*ontoAWS_*andcdintorunner/guest.make plan-test:prod snapshots both guests before either changes: the step order, read offmake -n.the runner snapshot reads 145 from the runner state:scripts/snapshot.sh(a stand-in) is handed145from the runner Stack's state, with no server Stack in the sandbox.tofusaw the runner record's key and not the server's. A state with no vmid is refused (no runner Guest to snapshot), and nothing is snapshotted.PROD_STEPSand dropped the directory argument, then ran the cases. They went red:plan tests: 4 case(s) FAILED.Then I restored the Makefile byte-identical.make check→ exit 0:env tests: every case passed.,plan tests: every case passed.The package fixture still reportsskip, because the machine has nodpkg.make runner-guest-plan, with the runner's deploy pair andinfra-actions@pve!deployin a scratch.env, shredded afterwards:.envalready carries the runner's pair. Run 61 loggedsecret/tofu-state/semaphore-runner/deploy → RUNNER_STATE_AWS_ACCESS_KEY_ID RUNNER_STATE_AWS_SECRET_ACCESS_KEY (rev 2), fetched ascockpit.Merge Danger
Door: two-way.
With the grant in place, the merge snapshots both Guests and plans both Stacks. Both plans read
No changestoday. Then it re-runs the service layer, a no-op on an unchanged tree. Without the grant, the run is red atrunner-snapshotand nothing changes. 143 just gets one extrapredeploy-*snapshot, and its prune keeps three.Blast Radius: the deploy.
Every future deploy now also needs the runner Stack's state readable, 145 reachable through the API, and
VM.Snapshoton it. A 145 that's down or unreadable now reds the whole deploy, where before it reddened only the service step.The grant (Operator)
This mirrors 143's rows exactly: the user and the token,
propagate 0. Withprivsepthe token can't exceed its user, so both rows are needed.Undo: the same two lines with
pveum acl delete /vms/145 ….infra-secrets'docs/proxmox-credentials.mdalready records this grant, so after it the doc is true again.Review started (round 1/5) on
6c576b9ab7— reading the diff now.repo olympus/infra-cockpit · PR #25 · head
6c576b9ab7· round 1/5 · verdict: merge (0 blockers, 1 advisory). The thread's count is the review list (empty) plus one; the dispatch said 1/5 too.Recommendation: merge
Condition on the merge, not a finding: the PR's own hold stands.
infra-actions@pve!deploymust holdTofuGuestInPlaceon/vms/145first, or the merge's deploy goes red atrunner-snapshot. That is fail-closed (143 gets one extrapredeploy-*, nothing else changes) and the author disclosed it. I could not read the Proxmox ACL from here, so the grant is unverified.Spec source: CP-42 in Vikunja (project 11, index 42), read live; the PR body names it. The criterion this PR carries is the last one: "The next merge deploys both Guests and leaves a
predeploy-*snapshot on 143 and on 145." The ticket's body line "make prodgains the runner's guest and service steps, and the snapshot covers 145" is the same claim.Standards source:
AGENTS.md(§Rules/Toolchain, §Docs, §Pull requests); nodocs/adr/in this repo. The org ADRs the repo defers to (ADR-0009/0010/0011) were not re-read: nothing in the diff touches their subjects (who deploys, what the judge refuses), and the deploy still applies only judged plans.Standards
runner-snapshot.docs/environment.md:68: "make runner-guest-planandmake runner-guestput this pair on the backend'sAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYfor their own run".runner-snapshotnow does it too (Makefile:426→runner_guest_stack_init→use_state_creds,Makefile:226).scripts/snapshot.sh:3-5(untouched): "make snapshotruns it with the vmid it read out of this repository's state; it is the first step ofmake prod".make runner-snapshotnow runs it too, with the vmid from the runner's state.AGENTS.md §Docs(the docs page owns where every environment name comes from) read for what it intends; the repo does not state a rule that docs change with the code, so this is advice. One finding, two sites.Smell baseline: nothing worth a flag.
Duplicated Code:runner-snapshotrepeatssnapshot's four-line shape, but it differs in preamble, identity, directory and words, and the author folded the shared part intoguest_identity's optional third argument rather than copying it.Speculative Generality: the$(3)argument has a caller,Makefile:427.Spec
No requirement missing, none partial, no scope creep. Every hunk maps to the criterion:
PROD_STEPS(Makefile:61), therunner-snapshotTarget (Makefile:425-430),guest_identity's directory argument (Makefile:169-171,185),RUNNER_GUEST_IDENTITY(Makefile:37), the.PHONYentry (Makefile:266), thedeploy.ymlcomment and step name,docs/deploy.md:67-88, and the two new cases (scripts/tests/plan-check.sh:374,:411). No finding on this axis.What I verified, and how
All at the head worktree,
refs/pull/25/head=6c576b9…(resolved before and after the work; unchanged). Scratch:cache/scratch/infra-cockpit-25-r1/.make -n prod NONINTERACTIVE=1prod: makelines readsnapshot,runner-snapshot,guest,runner-guest,service,verifymake -n runner-snapshotRUNNER_STATE_*exported ontoAWS_*,cd runner/guest,tofu outputreadsrunner_identity/vmid;runner_identityexists atrunner/guest/container.tf:65make checkgreenmise exec -- make check, rc captured before any pipeplan tests: every case passed.; env tests, fmt-check passmake plan-teston eachPROD_STEPS→ 1 FAIL; B drop the directory argument → 3 FAIL; C snapshot afterguest→ 1 FAIL (the order case, not just membership); D server preamble inrunner-snapshot→ 4 FAIL; E wrong identity name → 2 FAIL; Frunner-snapshotabsent → 1 FAIL; G refusal removed → 3 FAIL. All mutations changed the file (checked withcmp)tofustub, at head and at base770c0f8make snapshotprints the same sentence at both, namingcd semaphore/guest;make runner-snapshotnamescd runner/guest, rc 2env.map/.env.examplecarry the runner pairenv.map"actors=pit,cockpit … RUNNER_STATE_AWS_*";.env.example:32-33), sorunner-snapshothas its credentials in the deploy's.envget_commit_statusespr-checks / check,plan / guest-plan-check,plan / runner-guest-plan-check: allsuccessNot verified: the PR's live evidence (the
403 … /vms/145, VM.Auditread, run 61's fetch line); a real snapshot of 145 and the runner's apply from the deploy token, which the author says are first exercised by this merge; the Proxmox grant itself. I have no credentials for PROD and ran none.Named, not charged
.forgejo/workflows/deploy.yml:2is now 99 characters in a header block wrapped near 80. The base already has two lines over 80 and the repo states no width rule.make helppads the Target name to 14 characters (Makefile:269);runner-snapshotis 15, so its row runs into its description.runner-guest-plan(17) already does the same, and the diff did not introduce the format.Summary
docs/environment.md:68andscripts/snapshot.sh:3-5no longer enumerate the Targets correctlyThe recommendation turns on blockers and the advisory count, not on weight: there is no blocker and one advisory, so merge. Merge only after the Operator's grant on
/vms/145.