consent — join's systemctl enable --now sshd fails: Ubuntu droplet's unit is ssh #913

Closed
opened 2026-08-27 19:12:52 +00:00 by matou-build-agent · 3 comments

The failure

artifacts/verdict.json — the drive is red at the last leg it recorded, consent:

{ "verdict": "red", "target": "idip", "firstRedLeg": "consent",
  "legs": { "total": 6, "green": 5, "red": 1, "skip": 0 },
  "commit": "e8a0ac6aa6c7607bc0afbbbf2fe62ca2dc57a12b" }

Every human-facing beat of the consent leg worked — the contribution menu rendered, 1 was chosen, WIPE was typed, consent was recorded, the probe ran, the connection request went out, and the operator side approved it. The join then died bringing the clan connection up. artifacts/consent-transcript.txt:15-20 (byte-identical to legs.json's error and to the Playwright error-context.md):

✓ consent recorded — the wipe runs at first deploy
probing: linux · x86_64 · 2 threads · 3 GB memory · 76 GB disk
✓ connection request sent to 
waiting for the operator's decision…
time=2026-08-27T18:56:39.414Z level=ERROR msg="enroll did not complete" component=agent err="join: clan connection up: trust: bring the clan connection (sshd) up over the mesh: systemctl [enable --now sshd]: exit status 1: Failed to enable unit: Unit file sshd.service does not exist.\n"
Connection to 170.64.164.98 closed.

sshd.service is the RHEL/NixOS unit name. The rehearsal droplet is Debian-family, where the unit is ssh.service.

This is not the drive's known frontier

The KNOWN frontier given for this drive is "pairing never flips — the own-VPS carrier issue named in legs.json's skip reasons". Two facts in this run directory rule that out:

  • legs.json carries no skip reasons at all. All six records are {leg, status, ms} (plus error on the red one); verdict.json agrees — "skip": 0. There is no skipped leg naming an own-VPS carrier issue.
  • Pairing did flip on this run. state/enroll.json shows the request reaching "status": "approved" with a node grant ("node": "node-req-0001", a node_cert serial), and logs/founding-state.log records the operator-side event: "gateway paired and approved as node node-req-0001 — probed 2 vCPU · 4 GB · 76 GB meets the minimum".

So this is a new, distinct, device-side red after approval — not the known pairing frontier.

Evidence that the unit name is the whole of it

The droplet is Ubuntu 24.04 — logs/droplet-do-forensics.txt:

=== droplet 595687337 ===
name:    clan-lab-rehearsal-5f4e4804
status:  active
region:  syd1
size:    s-2vcpu-4gb
image:   24.04 (LTS) x64

The SSH unit it actually has is ssh — logs/droplet-journal.txt:899,1011,1014:

Aug 27 18:56:16 clan-lab-rehearsal-5f4e4804 systemd[1]: Listening on ssh.socket - OpenBSD Secure Shell server socket.
Aug 27 18:56:18 clan-lab-rehearsal-5f4e4804 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
Aug 27 18:56:18 clan-lab-rehearsal-5f4e4804 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.

And what the step was trying to achieve was already true. logs/droplet-units.txt (ss -tlnp, harvested 18:57, a minute after the red):

LISTEN 0 4096   0.0.0.0:22   0.0.0.0:*   users:(("sshd",pid=1084,fd=3),("systemd",pid=1,fd=148))
LISTEN 0 4096      [::]:22      [::]:*   users:(("sshd",pid=1084,fd=4),("systemd",pid=1,fd=149))

sshd was listening on :22 and was carrying the very session that failed — logs/droplet-journal.txt:1157: Accepted publickey for root from 134.199.154.244 port 47598, seconds before the error. systemctl --failed in logs/droplet-units.txt is empty; logs/droplet-do-forensics.txt records tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did, ping 0% loss, and the only DO action on the droplet is the create (no power_cycle/resize/migration). The agent was healthy right up to the call — logs/droplet-journal.txt:1149,1153: Started idss-agent.service - IDSS agent (ADR 0053) and msg="join socket listening" component=agent path=/run/idss/agent.sock.

Nothing on the box broke. The agent asked for a unit name that this distribution never had.

Suspected layer

Product — the agent's trust / clan-connection step. Not harness (it pasted the rendered install command and drove the real prompts; five legs green), not infra (the box was healthy before, during and after).

The fix appears to have already landed. This run was taken at e8a0ac6a; the repo's current main HEAD is 838d8c44, whose subject names this exact drive and this exact error: "agent/trust: the clan connection's SSH unit is ssh on Debian/Ubuntu — Up falls back from sshd, State reads the unit that answered (#788 drive 185504Z red at consent: 'Unit file sshd.service does not exist')". logs/healer-claude.out, written beside this drive, independently names agent/internal/trust/trust.go:28 as the hard-coded sshd, claims a commit 97a46388 that resolves the unit against the host (sshd first, then ssh) via systemctl cat <unit>.service, and reports go test ./agent/internal/trust/ 5/5 green. I could not verify either claim — this session is sandboxed to the run directory and was refused read access to the repo source. Treat the file:line, the commit hash and the test result as the healer's claim, corroborated only by the HEAD commit subject.

What plugging it needs

  1. Confirm on main that 838d8c44 is the unit-resolution fix its subject describes, and that it resolves the unit rather than swapping one hard-coded name for another. Ubuntu 24.04 ships Alias=sshd.service inside ssh.service, but the alias is inert while the unit is socket-activated — which is precisely why enable --now sshd failed on a box whose sshd was already serving traffic.
  2. Make the step idempotent about an already-up carrier: here sshd was listening on :22 and carrying the join session, so "bring the clan connection up" should short-circuit on an already-listening carrier rather than depend on an enable exiting 0.
  3. Re-drive #183 against a fresh 24.04 droplet. The healer states the journey was not re-run (it stands up a paid droplet), so the fix is unit-tested only and every leg past consent — including the own-VPS pairing frontier — remains unexercised on this carrier.

Absent / not consulted

  • No live-box section was appended to this prompt — no access line and no read-only limits were given, so I did not touch 170.64.164.98 and diagnosed from the harvested logs alone. The forensics show the box still answering at 18:57:21; a live systemctl cat ssh.service would be the last mile of corroboration, but logs/droplet-journal.txt already shows ssh.service starting, which is the same fact.
  • artifacts/journey.json is {"rows": null, "fault": null} — the drive never reached the founding rows, as expected for a death at consent.
  • logs/broker-journal.txt harvested nothing, by design: ssh: connect to host 100.98.48.68 port 22: Connection timed out — off the admin mesh (ADR 0208, #681); the verdict does not depend on it.
  • All logs/guest-*.log are empty and logs/qemu.log shows no qemu process (artifacts/host.json: "qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT"). This is the droplet carrier, not the VM path — not a finding.

Secondary observation (own ticket; do not fold into this fix)

The same transcript shows the community unnamed on every line that should name it, including the WIPE screen:

idss-agent unknown · joining 
...
✓ connection request sent to 

Meanwhile state/founding-state.json carries "name": "E2E Drive", and state/ contains no clan-config directory for a late-bound header source to read. Someone consented to having their disk erased without being told whose community they were joining. It did not red the leg, so it will keep shipping silently. logs/healer-claude.out filed this as a residual with confident: false — it needs a human ruling on where the pre-deploy name comes from, and is not part of the sshd defect.

drive 20260827T185504Z red at consent: the terminal join exited 1 --- transcript --- Warning: Permanently added '170.64.164.98' (ED25519) to the list of known hosts. idss-agent unknown · joining How should this machine contribute? [1] Ful
evidence: /home/dev/swarm/Matou/idss/test-results/drive-idip/20260827T185504Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure `artifacts/verdict.json` — the drive is red at the **last leg it recorded**, `consent`: ```json { "verdict": "red", "target": "idip", "firstRedLeg": "consent", "legs": { "total": 6, "green": 5, "red": 1, "skip": 0 }, "commit": "e8a0ac6aa6c7607bc0afbbbf2fe62ca2dc57a12b" } ``` Every human-facing beat of the consent leg worked — the contribution menu rendered, `1` was chosen, `WIPE` was typed, consent was recorded, the probe ran, the connection request went out, and the operator side *approved it*. The join then died bringing the clan connection up. `artifacts/consent-transcript.txt:15-20` (byte-identical to `legs.json`'s `error` and to the Playwright `error-context.md`): ``` ✓ consent recorded — the wipe runs at first deploy probing: linux · x86_64 · 2 threads · 3 GB memory · 76 GB disk ✓ connection request sent to waiting for the operator's decision… time=2026-08-27T18:56:39.414Z level=ERROR msg="enroll did not complete" component=agent err="join: clan connection up: trust: bring the clan connection (sshd) up over the mesh: systemctl [enable --now sshd]: exit status 1: Failed to enable unit: Unit file sshd.service does not exist.\n" Connection to 170.64.164.98 closed. ``` `sshd.service` is the RHEL/NixOS unit name. The rehearsal droplet is Debian-family, where the unit is `ssh.service`. ## This is not the drive's known frontier The KNOWN frontier given for this drive is "pairing never flips — the own-VPS carrier issue named in `legs.json`'s skip reasons". Two facts in this run directory rule that out: - **`legs.json` carries no skip reasons at all.** All six records are `{leg, status, ms}` (plus `error` on the red one); `verdict.json` agrees — `"skip": 0`. There is no skipped leg naming an own-VPS carrier issue. - **Pairing did flip on this run.** `state/enroll.json` shows the request reaching `"status": "approved"` with a node grant (`"node": "node-req-0001"`, a `node_cert` serial), and `logs/founding-state.log` records the operator-side event: `"gateway paired and approved as node node-req-0001 — probed 2 vCPU · 4 GB · 76 GB meets the minimum"`. So this is a new, distinct, device-side red *after* approval — not the known pairing frontier. ## Evidence that the unit name is the whole of it The droplet is Ubuntu 24.04 — `logs/droplet-do-forensics.txt`: ``` === droplet 595687337 === name: clan-lab-rehearsal-5f4e4804 status: active region: syd1 size: s-2vcpu-4gb image: 24.04 (LTS) x64 ``` The SSH unit it actually has is `ssh` — `logs/droplet-journal.txt:899,1011,1014`: ``` Aug 27 18:56:16 clan-lab-rehearsal-5f4e4804 systemd[1]: Listening on ssh.socket - OpenBSD Secure Shell server socket. Aug 27 18:56:18 clan-lab-rehearsal-5f4e4804 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Aug 27 18:56:18 clan-lab-rehearsal-5f4e4804 systemd[1]: Started ssh.service - OpenBSD Secure Shell server. ``` And what the step was trying to achieve was **already true**. `logs/droplet-units.txt` (`ss -tlnp`, harvested 18:57, a minute after the red): ``` LISTEN 0 4096 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=1084,fd=3),("systemd",pid=1,fd=148)) LISTEN 0 4096 [::]:22 [::]:* users:(("sshd",pid=1084,fd=4),("systemd",pid=1,fd=149)) ``` sshd was listening on :22 and was carrying the very session that failed — `logs/droplet-journal.txt:1157`: `Accepted publickey for root from 134.199.154.244 port 47598`, seconds before the error. `systemctl --failed` in `logs/droplet-units.txt` is **empty**; `logs/droplet-do-forensics.txt` records `tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did`, ping 0% loss, and the only DO action on the droplet is the `create` (no power_cycle/resize/migration). The agent was healthy right up to the call — `logs/droplet-journal.txt:1149,1153`: `Started idss-agent.service - IDSS agent (ADR 0053)` and `msg="join socket listening" component=agent path=/run/idss/agent.sock`. Nothing on the box broke. The agent asked for a unit name that this distribution never had. ## Suspected layer **Product** — the agent's trust / clan-connection step. Not harness (it pasted the rendered install command and drove the real prompts; five legs green), not infra (the box was healthy before, during and after). **The fix appears to have already landed.** This run was taken at `e8a0ac6a`; the repo's current `main` HEAD is `838d8c44`, whose subject names this exact drive and this exact error: *"agent/trust: the clan connection's SSH unit is `ssh` on Debian/Ubuntu — Up falls back from sshd, State reads the unit that answered (#788 drive 185504Z red at consent: 'Unit file sshd.service does not exist')"*. `logs/healer-claude.out`, written beside this drive, independently names `agent/internal/trust/trust.go:28` as the hard-coded `sshd`, claims a commit `97a46388` that resolves the unit against the host (`sshd` first, then `ssh`) via `systemctl cat <unit>.service`, and reports `go test ./agent/internal/trust/` 5/5 green. **I could not verify either claim** — this session is sandboxed to the run directory and was refused read access to the repo source. Treat the file:line, the commit hash and the test result as the healer's claim, corroborated only by the HEAD commit subject. ## What plugging it needs 1. Confirm on `main` that `838d8c44` is the unit-resolution fix its subject describes, and that it *resolves* the unit rather than swapping one hard-coded name for another. Ubuntu 24.04 ships `Alias=sshd.service` inside `ssh.service`, but the alias is inert while the unit is socket-activated — which is precisely why `enable --now sshd` failed on a box whose sshd was already serving traffic. 2. Make the step idempotent about an already-up carrier: here sshd was listening on :22 and carrying the join session, so "bring the clan connection up" should short-circuit on an already-listening carrier rather than depend on an `enable` exiting 0. 3. **Re-drive #183 against a fresh 24.04 droplet.** The healer states the journey was *not* re-run (it stands up a paid droplet), so the fix is unit-tested only and every leg past `consent` — including the own-VPS pairing frontier — remains unexercised on this carrier. ## Absent / not consulted - **No live-box section was appended to this prompt** — no access line and no read-only limits were given, so I did not touch `170.64.164.98` and diagnosed from the harvested logs alone. The forensics show the box still answering at 18:57:21; a live `systemctl cat ssh.service` would be the last mile of corroboration, but `logs/droplet-journal.txt` already shows `ssh.service` starting, which is the same fact. - `artifacts/journey.json` is `{"rows": null, "fault": null}` — the drive never reached the founding rows, as expected for a death at `consent`. - `logs/broker-journal.txt` harvested nothing, by design: `ssh: connect to host 100.98.48.68 port 22: Connection timed out` — off the admin mesh (ADR 0208, #681); the verdict does not depend on it. - All `logs/guest-*.log` are empty and `logs/qemu.log` shows no qemu process (`artifacts/host.json`: `"qemu": "exit ENOENT: spawn qemu-system-x86_64 ENOENT"`). This is the droplet carrier, not the VM path — not a finding. ## Secondary observation (own ticket; do not fold into this fix) The same transcript shows the community **unnamed** on every line that should name it, including the WIPE screen: ``` idss-agent unknown · joining ... ✓ connection request sent to ``` Meanwhile `state/founding-state.json` carries `"name": "E2E Drive"`, and `state/` contains no `clan-config` directory for a late-bound header source to read. Someone consented to having their disk erased without being told whose community they were joining. It did not red the leg, so it will keep shipping silently. `logs/healer-claude.out` filed this as a residual with `confident: false` — it needs a human ruling on where the pre-deploy name comes from, and is not part of the sshd defect. drive `20260827T185504Z` red at `consent`: `the terminal join exited 1 --- transcript --- Warning: Permanently added '170.64.164.98' (ED25519) to the list of known hosts. idss-agent unknown · joining How should this machine contribute? [1] Ful` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-idip/20260827T185504Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 28ff46f6d26f -->
Owner

Already fixed on main at 838d8c44 (agent/internal/trust tries sshd then ssh). Parked no-triage so no worker re-does it; it stays the blocker until get.idss.nz serves ≥ 838d8c44 (CI publish → reseed timer) and drive 8 proves it — then it closes. (Closing it earlier makes the reporter re-file for the same red drive: #912 → #913.)

Already fixed on `main` at `838d8c44` (`agent/internal/trust` tries `sshd` then `ssh`). Parked `no-triage` so no worker re-does it; it stays the blocker until `get.idss.nz` serves ≥ `838d8c44` (CI publish → reseed timer) and drive 8 proves it — then it closes. (Closing it earlier makes the reporter re-file for the same red drive: #912 → #913.)
Author
Member

Claim released — no agent work taken.

Following @ben's ruling above: the unit-name fix already landed on main at 838d8c44 (agent/internal/trust/trust.go — Up tries sshd then falls back to ssh; State reads the unit that answered), and the issue is parked no-triage to stay open as the blocker until get.idss.nz serves ≥ 838d8c44 (CI publish → reseed timer) and drive 8 proves it live. I did not re-implement the fix and did not close it early (closing early re-files the same red drive per the note above).

Leaving the label state as Ben curated it (no-triage, open). The ticket's "point 2 (idempotency)" suggestion is deliberately held for drive-8 empirical proof rather than added speculatively against the no-triage park; if drive 8 still reds on socket-activated ssh.service, that would be a fresh, evidence-backed ticket.

Claim released — no agent work taken. Following @ben's ruling above: the unit-name fix already landed on `main` at `838d8c44` (`agent/internal/trust/trust.go` — `Up` tries `sshd` then falls back to `ssh`; `State` reads the unit that answered), and the issue is parked `no-triage` to **stay open as the blocker** until `get.idss.nz` serves ≥ `838d8c44` (CI publish → reseed timer) and drive 8 proves it live. I did **not** re-implement the fix and did **not** close it early (closing early re-files the same red drive per the note above). Leaving the label state as Ben curated it (`no-triage`, open). The ticket's "point 2 (idempotency)" suggestion is deliberately held for drive-8 empirical proof rather than added speculatively against the `no-triage` park; if drive 8 still reds on socket-activated `ssh.service`, that would be a fresh, evidence-backed ticket.
Owner

Closing — fixed AND live in the bits the drive fetches. Verified against the served artifact, not just main.

The fix is 838d8c44 (agent/internal/trust/trust.go): var sshUnits = []string{"sshd", "ssh"}, Up tries them in order and remembers which one answered, State reads that same unit back via sshUnit(), and it fails loud naming the whole list when none can be enabled.

I closed the twin ticket #912 earlier on the reasoning "fixed at HEAD" and that was wrong — the joining device fetches its agent from get.idss.nz, and at that moment the served release predated the fix. Corrected on #912. So this closure states the check that actually matters:

$ git merge-base --is-ancestor 838d8c44 dcab019c        → YES
$ curl -I https://get.idss.nz/get?arch=x86_64
  x-idss-release: dcab019cad44b15721c78f7cb9c4cfd7569de28b
$ oc_bootstrap_staleness dcab019c… origin/main .
  bootstrap-fresh: carries every agent-affecting commit up to origin/main   (rc=0)

The fix is in the artifact the next drive will run, not merely on main.

Why it took so long to get there is worth recording: 838d8c44's own new test tripped revive's error-strings rule (it scripts systemd's verbatim capitalised, full-stopped refusal), which reddened seam; publish is needs: seam, so it skipped (runs 27973, 28041); no idss-agent package was minted; idss-reseed.timer had nothing newer to pull; and get.idss.nz sat one agent-commit stale while every drive re-ran the very defect this ticket describes. #914 fixed the lint (dcab019c), seam went green (28052), publish succeeded (28066), the package minted at 20:10:44Z, and the droplet's timer advanced the served pin.

The durable lesson, and the one I got wrong first: "fixed on main" and "fixed in the bits under test" are different claims on this project, and they can diverge for hours. Check x-idss-release before concluding a drive red is stale-bits or a live defect.

#788 is unblocked by this closure and re-fires on the next tick — the first IDIP drive to run all four of the day's fixes (d53a4de3, 3141ddd1, ab538cc9, 838d8c44).

**Closing — fixed AND live in the bits the drive fetches. Verified against the served artifact, not just `main`.** The fix is `838d8c44` (`agent/internal/trust/trust.go`): `var sshUnits = []string{"sshd", "ssh"}`, `Up` tries them in order and **remembers which one answered**, `State` reads that same unit back via `sshUnit()`, and it fails loud naming the whole list when none can be enabled. I closed the twin ticket #912 earlier on the reasoning "fixed at HEAD" and **that was wrong** — the joining device fetches its agent from `get.idss.nz`, and at that moment the served release predated the fix. Corrected on #912. So this closure states the check that actually matters: ``` $ git merge-base --is-ancestor 838d8c44 dcab019c → YES $ curl -I https://get.idss.nz/get?arch=x86_64 x-idss-release: dcab019cad44b15721c78f7cb9c4cfd7569de28b $ oc_bootstrap_staleness dcab019c… origin/main . bootstrap-fresh: carries every agent-affecting commit up to origin/main (rc=0) ``` **The fix is in the artifact the next drive will run**, not merely on `main`. Why it took so long to get there is worth recording: `838d8c44`'s own new test tripped revive's `error-strings` rule (it scripts systemd's verbatim capitalised, full-stopped refusal), which reddened `seam`; `publish` is `needs: seam`, so it skipped (runs 27973, 28041); no `idss-agent` package was minted; `idss-reseed.timer` had nothing newer to pull; and `get.idss.nz` sat one agent-commit stale while every drive re-ran the very defect this ticket describes. #914 fixed the lint (`dcab019c`), seam went green (28052), publish succeeded (28066), the package minted at 20:10:44Z, and the droplet's timer advanced the served pin. **The durable lesson, and the one I got wrong first:** "fixed on `main`" and "fixed in the bits under test" are different claims on this project, and they can diverge for hours. Check `x-idss-release` before concluding a drive red is stale-bits or a live defect. #788 is unblocked by this closure and re-fires on the next tick — the first IDIP drive to run all four of the day's fixes (`d53a4de3`, `3141ddd1`, `ab538cc9`, `838d8c44`).
ben closed this issue 2026-08-28 03:04:38 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#913
No description provided.