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

Closed
opened 2026-08-28 03:19:23 +00:00 by matou-build-agent · 1 comment

The failure

The drive is red at the last leg it recorded. artifacts/verdict.json:

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

Every human-facing beat of consent worked — the contribution menu rendered, 1 was chosen, WIPE was typed, consent was recorded, the machine was probed, the connection request went out, and the operator side approved it. The join then died bringing the clan connection up. artifacts/consent-transcript.txt (byte-identical to legs.json's error field 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 reaches "status": "approved" with a node grant ("node": "node-req-0001" and a node_cert whose "subject": "node-req-0001"), and logs/founding-state.log:119 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 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 at 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))

That same sshd 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 or 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 systemd for a unit name 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, screenshots present for all six). 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 quoted above.

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 exactly 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 Playwright journey was not re-run (it stands up a paid droplet), so the fix is unit-tested only, and every leg past consent 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:21Z; 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, logs/state-logs.log reports no state/logs directory, 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 logs/founding-state.log carries "name": "E2E Drive" in the committed draft, 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 The drive is red at the last leg it recorded. `artifacts/verdict.json`: ```json { "verdict": "red", "target": "idip", "firstRedLeg": "consent", "legs": { "total": 6, "green": 5, "red": 1, "skip": 0 }, "commit": "e8a0ac6aa6c7607bc0afbbbf2fe62ca2dc57a12b" } ``` Every human-facing beat of `consent` worked — the contribution menu rendered, `1` was chosen, `WIPE` was typed, consent was recorded, the machine was probed, the connection request went out, and the operator side approved it. The join then died bringing the clan connection up. `artifacts/consent-transcript.txt` (byte-identical to `legs.json`'s `error` field 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` reaches `"status": "approved"` with a node grant (`"node": "node-req-0001"` and a `node_cert` whose `"subject": "node-req-0001"`), and `logs/founding-state.log:119` 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 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 at 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)) ``` That same sshd 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 or 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 systemd for a unit name 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, screenshots present for all six). 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 quoted above. ## 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 exactly 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 Playwright journey was *not* re-run (it stands up a paid droplet), so the fix is unit-tested only, and every leg past `consent` 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:21Z; 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, `logs/state-logs.log` reports no `state/logs` directory, 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 `logs/founding-state.log` carries `"name": "E2E Drive"` in the committed draft, 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

Ruled by agent under ADR 0174 (the watch's hands) — veto anytime: closing. This is the THIRD filing of one already-fixed defect, and it is deadlocking the drive.

Same defect as #912 and #913 (both closed): systemctl enable --now sshd on an Ubuntu droplet whose unit is ssh. Fixed by 838d8c44 — var sshUnits = []string{"sshd", "ssh"}, Up tries them in order and remembers which answered, State reads that same unit back.

I closed #912 on the reasoning "fixed at HEAD" and that was wrong, because the joining device fetches its agent from get.idss.nz and the served release predated the fix. So here is the check that actually settles it, done properly:

# check result
1 served pin (x-idss-release) dcab019cad44b15721c78f7cb9c4cfd7569de28b
2 git merge-base --is-ancestor 838d8c44 dcab019c YES — the fix is in the served artifact
3 reported drive 20260827T185504Z started 2026-08-27T18:56:28Z
4 dcab019c pushed 2026-08-27T20:00:05Z
5 IDIP drives since the fix none — 185504Z is still the newest

The evidence this ticket cites is from a run that predates its own fix by 64 minutes, and it is being re-filed against that same stale run each cycle.

The deadlock, which is the part that matters

#788 is blocked by this ticket. The drive is the only thing that can demonstrate the defect is gone. So the ticket blocks the drive, and the drive is what would close the ticket — and each executor cycle re-files it from the same old evidence. Left alone this never resolves; it is not slow, it is stuck.

The machinery gap, now on its third instance

Neither the reporter nor the healer checks whether the red it is acting on still reproduces in the bits a new drive would run before filing or fixing. Today that has cost: three healer attempts on an already-fixed red (two rebase onto origin/main conflicted, one diff cap breach (2 files / 91 lines; cap 3/60), all reverted), three executor ticks lost to held capacity, swarm workers dispatched at closed tickets, and three tickets (#912, #913, #916) for one defect. The healer is still carrying signature 28ff46f6d26f, whose defect has been fixed twice over.

The check is cheap — HEAD get.idss.nz, read x-idss-release, and git merge-base --is-ancestor <fix> <served>; scripts/lib/bootstrap-staleness-lib.sh already does exactly this for the drive-side preflight and could be reused verbatim on the report/heal side. Filing that separately rather than burying it here.

#788 is unblocked by this closure and re-fires on the next tick — and that drive, not another ticket, is what will settle whether the sshd fix holds.

**Ruled by agent under ADR 0174 (the watch's hands) — veto anytime: closing. This is the THIRD filing of one already-fixed defect, and it is deadlocking the drive.** Same defect as #912 and #913 (both closed): `systemctl enable --now sshd` on an Ubuntu droplet whose unit is `ssh`. Fixed by `838d8c44` — `var sshUnits = []string{"sshd", "ssh"}`, `Up` tries them in order and remembers which answered, `State` reads that same unit back. I closed #912 on the reasoning "fixed at HEAD" and **that was wrong**, because the joining device fetches its agent from `get.idss.nz` and the served release predated the fix. So here is the check that actually settles it, done properly: | # | check | result | |---|---|---| | 1 | served pin (`x-idss-release`) | `dcab019cad44b15721c78f7cb9c4cfd7569de28b` | | 2 | `git merge-base --is-ancestor 838d8c44 dcab019c` | **YES** — the fix is in the served artifact | | 3 | reported drive `20260827T185504Z` started | `2026-08-27T18:56:28Z` | | 4 | `dcab019c` pushed | `2026-08-27T20:00:05Z` | | 5 | IDIP drives since the fix | **none** — `185504Z` is still the newest | The evidence this ticket cites is from a run that **predates its own fix by 64 minutes**, and it is being re-filed against that same stale run each cycle. ## The deadlock, which is the part that matters `#788` is blocked by this ticket. The drive is the only thing that can demonstrate the defect is gone. So the ticket blocks the drive, and the drive is what would close the ticket — and each executor cycle re-files it from the same old evidence. Left alone this never resolves; it is not slow, it is stuck. ## The machinery gap, now on its third instance Neither the reporter nor the healer checks whether the red it is acting on **still reproduces in the bits a new drive would run** before filing or fixing. Today that has cost: three healer attempts on an already-fixed red (two `rebase onto origin/main conflicted`, one `diff cap breach (2 files / 91 lines; cap 3/60)`, all reverted), three executor ticks lost to held capacity, swarm workers dispatched at closed tickets, and three tickets (#912, #913, #916) for one defect. The healer is *still* carrying signature `28ff46f6d26f`, whose defect has been fixed twice over. The check is cheap — HEAD `get.idss.nz`, read `x-idss-release`, and `git merge-base --is-ancestor <fix> <served>`; `scripts/lib/bootstrap-staleness-lib.sh` already does exactly this for the drive-side preflight and could be reused verbatim on the report/heal side. Filing that separately rather than burying it here. `#788` is unblocked by this closure and re-fires on the next tick — and that drive, not another ticket, is what will settle whether the sshd fix holds.
ben closed this issue 2026-08-28 03:22:07 +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#916
No description provided.