deploy: Finish activations whose connection drops #3

Merged
dev merged 1 commits from deploy-outlive-connection into main 2026-11-25 10:17:02 +00:00

Deploying palace and slop-cannon together (request dcc973) left both on their old generations:

  • Switching palace stopped slop-broker.service, which dropped the broker's SSH connection to slop-cannon mid-activation.
  • Activation runs in a transient unit, but with systemd-run --pipe its output still went straight back over that connection, and activate-rs panics (exit 101) when a write fails, leaving the switch half done.

Changes:

  • Inside the unit, activate-rs's output goes through cat || cat >/dev/null (with pipefail), so output streams as before while the connection is there and is discarded after; activation always finishes and its exit status still comes back. A test drops the reader before the activation writes and checks it finishes.
  • The NixOS module sets restartIfChanged = false on slop-broker.service, so deploying the broker's own box doesn't stop it and the deploy reports its result. A new version or configuration takes effect at the next restart of the service.
  • docs/design.md and docs/architecture.md describe both.

Tested: cargo clippy --all-targets, nix build (all tests) and the VM test.

🤖 Generated with Claude Code

Deploying `palace` and `slop-cannon` together (request `dcc973`) left both on their old generations: - Switching `palace` stopped `slop-broker.service`, which dropped the broker's SSH connection to `slop-cannon` mid-activation. - Activation runs in a transient unit, but with `systemd-run --pipe` its output still went straight back over that connection, and `activate-rs` panics (exit 101) when a write fails, leaving the switch half done. Changes: - Inside the unit, `activate-rs`'s output goes through `cat || cat >/dev/null` (with `pipefail`), so output streams as before while the connection is there and is discarded after; activation always finishes and its exit status still comes back. A test drops the reader before the activation writes and checks it finishes. - The NixOS module sets `restartIfChanged = false` on `slop-broker.service`, so deploying the broker's own box doesn't stop it and the deploy reports its result. A new version or configuration takes effect at the next restart of the service. - `docs/design.md` and `docs/architecture.md` describe both. Tested: `cargo clippy --all-targets`, `nix build` (all tests) and the VM test. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
slop-cannon Bot added 1 commit 2026-11-25 09:57:57 +00:00
deploy: Finish activations whose connection drops
CI / Check (pull_request) Successful in 5m1s
CI / Check (push) Successful in 4m55s
ebf22a932d
Activation runs in a transient unit, but its output still went
straight back over the connection, and `activate-rs` panics when a
write fails. Deploying `palace` and `slop-cannon` together stopped
the broker, which dropped the connection to `slop-cannon` and left
its switch half done. The output now goes through a `cat` that gives
way to one discarding it once the connection is gone.

Switching also no longer restarts the broker, so it can deploy its
own box and report the result; a new version or configuration takes
effect at the next restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dev merged commit ebf22a932d into main 2026-11-25 10:17:02 +00:00
dev deleted branch deploy-outlive-connection 2026-11-25 10:17:02 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/slop-broker#3