Control-plane restarts cost running tasks nothing (SPEC §7.1) #12
Loading…
Reference in a new issue
No description provided.
Delete branch "lu/cp-restart"
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?
What
Restarting the control plane (a
nixos-rebuild switch, a crash), or having it down for minutes while a bad deploy is rolled back, no longer kills or re-runs work across the fleet. docs/live-upgrades.md §4.3, minus the forge outbox, reconciliation and late effectful verdicts (separate PRs).listen_addr/agent_listen_addrfrom systemd (LISTEN_FDS,listenfdcrate), matched to the configured addresses; falls back to binding. The NixOS module addskrisbuild-control-plane.socketforsettingsdeploys; the serviceRequires/Afterit,TimeoutStopSec = 30,stopIfChanged = false(so a switch doesn't also stop the socket and drop queued connections).lease_until = max(lease_until, now + reconnect_grace_secs)(default 120) for assigned/running instances — CP downtime never counts against a node.Hello; a CP silent for 20 s after having acked is treated as gone.lease_ttl); disconnected → runs survivedisconnected_grace_secs(default 900, ≥lease_ttl); on reconnect the first ack is authoritative. Safety argument in code and SPEC §7.1.kbfollow resubscribes a dropped SSE stream (0/1/2/4/5 s, up to 15 min) instead of reporting a running graph as final; logs de-duplicated by offset.reconnect_grace_secs.Deploy notes
systemctl restart krisbuild-control-plane.socket krisbuild-control-plane.service.Tests
tests/restart.rs— graceful stop sends 1012, and after downtime >lease_ttlon the same DB the task completes on attempt 1.a_control_plane_restart_mid_task_costs_the_task_nothing(real in-process agent + follower, CP down 11 s vs 8 slease_ttl).nixos-modulecheck: socket listenStreams, wantedBy, service requires/after, stopIfChanged, TimeoutStopSec, no socket forconfigFile.🤖 Generated with Claude Code
@krisbuild r+
Removed from the merge queue: the pull-request head changed.
@krisbuild r+
@krisbuild r-
@krisbuild r+
The pull request head's own build failed (graph 603).
nix/dep/cargo-package-listenfd: exit-code on nuxbox, exit 1 — lognix/dep/source: exit-code on nuxbox, exit 1 — logPush a fix, or comment
@krisbuild retryto rerun the failed tasks and requeue.Removed from the merge queue: the pull-request head changed.
@krisbuild r+
The pull request head's own build failed (graph 632).
nix/build: exit-code on nuxbox, exit 1 — lognix/clippy: exit-code on nuxbox, exit 1 — lognix/test: exit-code on nuxbox, exit 1 — logPush a fix, or comment
@krisbuild retryto rerun the failed tasks and requeue.@krisbuild retry
rerunning the failed tasks of graph 632 as graph 649 — the entry waits on it.
Removed from the merge queue: the pull-request head changed.
@krisbuild r+
The pull request head's own build failed (graph 650).
nix/kb-check: exit-code on nuxbox, exit 1 — lognix/test-deps: exit-code on nuxbox, exit 1 — logPush a fix, or comment
@krisbuild retryto rerun the failed tasks and requeue.@krisbuild r+
The pull request head's own build failed (graph 665).
nix/test: exit-code on nuxbox, exit 1 — logPush a fix, or comment
@krisbuild retryto rerun the failed tasks and requeue.Removed from the merge queue: the pull-request head changed.
@krisbuild r+
Merged as
3d0651236d.