Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#861
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Follow-up from #858 (filed by the session that fixed it — the residue that fix deliberately leaves open).
What #858 changed
gatewayControlPlaneUnit(internal/clan/vmguest.go) now rendersrestartIfChanged = false+stopIfChanged = falseonsystemd.services.idss-control-plane, so a gateway switch never stops the very unit whose cgroup holds theclanCLI driving it. That is what stops the switch dying at 101 mid-stop-phase and leaving the control plane down forever.The residue
Because the switch no longer restarts it, a re-render that changes the unit's ENV takes effect only on the unit's next start. The live case is #790's
EnableGatewayNextcloudExport: afterdeploy-files, the unit text carriesIDSS_NEXTCLOUD_ADMIN_USER/IDSS_NEXTCLOUD_ADMIN_PASSWORD, but the RUNNING control plane still has the pre-files environment — so the member-orbit reconciler (internal/nextcloud, ADR 0062 part 2) has no OCS credential until something restarts the unit.This is strictly better than the fault it replaces (the control plane was previously dead, not stale), but it is not closed.
Why the obvious fix does not work yet
The natural close is "issue an explicit restart once the deploy returns". It cannot land as-is:
deployRunStore(internal/controlapi/provision.go:~165) is in-memory — its own comment says "the run and the store share the control-plane process, so a restart loses both together". A restart therefore makesGET /api/v1/provision/devices/{id}/deployanswer 404no_deploy, and the dashboard's poll treats a definitive 4xx as terminal at once (GOTCHAS #84's rule,dashboard/src/lib/api/provisionClient.ts). The #835restartToleranceMs(90s) rides out 5xx/refused, NOT a 404. So an explicit restart mid- or just-post-deploy trades a 502 red for a 404 red.The same fact is why #858 did not take the other shape on the table (detach the driver into its own transient
systemd-rununit and let the switch freely restart the control plane): that shape restarts the control plane during the deploy, which loses the live run entirely.What closing it needs
IDSS_STATE_DIR(/var/lib/idss) and re-adopt the latest frame per device on start, so a control-plane restart is a poll gap (5xx/refused, already tolerated) rather than a 404.idss-control-planerestart after the deploy's terminal frame is written — detached (systemd-run/systemctl restart --no-block) so the restarting process is not the one issuing it.Verification
Unit-testable at the seam for (1) — write frames, restart, read back. The end-to-end proof is a droplet drive reaching
deploy-filesgreen with the reconciler holding a live Nextcloud credential.deploy-files' switch stopsidss-control-plane, whose cgroup holds theclanCLI, andswitch-to-configurationdies at 101 before it ever restarts anything #858deploy-files' switch stopsidss-control-plane, whose cgroup holds theclanCLI, andswitch-to-configurationdies at 101 before it ever restarts anything #858Ruled by agent under ADR 0174 — veto anytime
Ruling:
wontfix— already addressed, by a different (and since-preferred) mechanism than the one this issue's closing plan proposes.What changed since filing: #863 closed the concrete case this issue named (the #790 Nextcloud OCS credential) by making the control plane resolve that credential lazily, per call, from a boot-known file path, instead of taking it from process env at boot. That removes the need for any restart to pick up a post-
deploy-filesrender change for this credential — the specific residue this issue asks to close.Why the proposed direction is superseded, not just the symptom: this issue's own closing plan — persist
deployRunStore, then issue an explicit restart once a deploy's terminal frame lands — is the shape #863's own documentation explicitly rules out for this class of problem: "Self-restart shapes only trade this 401 for entry #84's 404 no_deploy (the #861 residue) — they are not the way out." The chosen path forward for the remaining boot-frozen ports (mail/static-sites/code/chat) is the same per-call lazy-resolver pattern #863 used, applied per-service as a live drive reaches each one — not the persisted-run-store/restart architecture this issue asks for.Why this is a two-way door: closing is reversible (reopen if a genuinely new case needs the persisted-run-store direction specifically); provable by the landed commit and its passing test proving the lazy resolver picks up a mid-life credential with no restart at all.
What proves it: the fix that resolved #790's residue via a per-call secret resolver reading a boot-known path (
nextcloud.SecretFromFile/NewWithSecretResolver), its test proving the same port authenticates after the secret materializes mid-life with zero restarts, and GOTCHAS #86/#87's own text naming the restart direction as rejected for this problem class.If a future feature needs the control plane to pick up a post-boot render change that can't be expressed as a lazily-read file (unlike a credential), that would be a new, narrower ticket against that specific service — not a reopening of this one's general run-store-persistence proposal.