activation: confirm whether the rented box reboots during enroll-activate (host-key change) and fix disko drift or add a host-key re-learn (#700 infra split) #701

Closed
opened 2026-08-23 10:30:21 +00:00 by matou-build-agent · 1 comment

What this splits off from #700

#700 fixed the classification bug (a deploy-stage control-plane probe transport error now surfaces as deploy-failed with per-mode recovery + a downloadable log, not a pre-deploy journey-fault the activation leg waited out) and the harness (the activation leg locator now also watches journey-fault). It deliberately left the infra root cause open, because it needs a live box and a security-posture decision that is a one-way door.

The underlying infra fact

On drive 20260823T092947Z the rented control-plane probe met an SSH host key that differed from the one connect pinned into state/own-vps/known_hosts (REMOTE HOST IDENTIFICATION HAS CHANGED), right after enroll-activate logged "the overwritten host came back a clan member" — wording that implies the box went away and came back.

internal/founding/rentedpath.go:34,265 assert "no reboot — the box keeps the host key connect learned", i.e. RotateHostKey is deliberately skipped for the rented path (unlike own-VPS after a takeover). That invariant was violated in this run.

docs/GOTCHAS.md #47 documents the hazard class: the gateway image disko.nix drifting from internal/clan/nodeconfig.go's DiskoLayout, so a VMMode clan update disturbs the already-installed disk on activation — worst case the box never returns; the milder case is a reboot that regenerates /etc/ssh host keys. Note the image-boot leg's disko label check passed, so if #47 is the cause it is a subtler layout drift than bare label presence catches.

What this needs

  1. Confirm whether the rented box actually rebooted during enroll-activate (contradicting rentedpath.go's no-reboot assumption) — needs a live rented droplet to reproduce (#700's droplet 170.64.134.129 is now unreachable).
  2. If it did reboot, decide between:
    • fixing the cause (check nix/gateway-image/disko.nix against DiskoLayout per GOTCHAS #47 so VMMode activation never disturbs the disk / triggers a reboot), or
    • adding a rented-path host-key re-learn step analogous to own-VPS RotateHostKey. This is a one-way-door security-posture decision (auto-accepting a changed host key on a public internet droplet), so it is ready-for-human, not agent-rulable under ADR 0174.

Why human

The host-key-accept option is a security-posture widening (accepting a changed key = accepting a possible MITM), and confirming the reboot needs a live lab droplet — outside a sandbox agent's reach.

Filed while working #700 (deploy-stage host-key mismatch classification).

## What this splits off from #700 #700 fixed the **classification** bug (a deploy-stage control-plane probe transport error now surfaces as `deploy-failed` with per-mode recovery + a downloadable log, not a pre-deploy `journey-fault` the `activation` leg waited out) and the **harness** (the `activation` leg locator now also watches `journey-fault`). It deliberately left the **infra root cause** open, because it needs a live box and a security-posture decision that is a one-way door. ## The underlying infra fact On drive `20260823T092947Z` the rented control-plane probe met an SSH host key that differed from the one `connect` pinned into `state/own-vps/known_hosts` (`REMOTE HOST IDENTIFICATION HAS CHANGED`), right after `enroll-activate` logged "the overwritten host came back a clan member" — wording that implies the box went away and came back. `internal/founding/rentedpath.go:34,265` assert **"no reboot — the box keeps the host key connect learned"**, i.e. `RotateHostKey` is deliberately skipped for the rented path (unlike own-VPS after a takeover). That invariant was violated in this run. `docs/GOTCHAS.md` #47 documents the hazard class: the gateway image `disko.nix` drifting from `internal/clan/nodeconfig.go`'s `DiskoLayout`, so a VMMode `clan update` disturbs the already-installed disk on activation — worst case the box never returns; the milder case is a reboot that regenerates `/etc/ssh` host keys. Note the `image-boot` leg's disko **label** check passed, so if #47 is the cause it is a subtler layout drift than bare label presence catches. ## What this needs 1. Confirm whether the rented box actually rebooted during `enroll-activate` (contradicting `rentedpath.go`'s no-reboot assumption) — needs a live rented droplet to reproduce (#700's droplet 170.64.134.129 is now unreachable). 2. If it did reboot, decide between: - **fixing the cause** (check `nix/gateway-image/disko.nix` against `DiskoLayout` per GOTCHAS #47 so VMMode activation never disturbs the disk / triggers a reboot), or - **adding a rented-path host-key re-learn step** analogous to own-VPS `RotateHostKey`. **This is a one-way-door security-posture decision** (auto-accepting a changed host key on a public internet droplet), so it is `ready-for-human`, not agent-rulable under ADR 0174. ## Why human The host-key-accept option is a security-posture widening (accepting a changed key = accepting a possible MITM), and confirming the reboot needs a live lab droplet — outside a sandbox agent's reach. Filed while working #700 (deploy-stage host-key mismatch classification).
Author
Member

Closing — both questions this ticket asked were answered and resolved by #707 (commit d62a7252, closed 2026-08-23 15:55Z), superseding the need for a separate live reproduction here.

  1. Did the box reboot? No. rentedpath.go's no-reboot contract held. The host key "changed" because the gateway image shipped with a shared, snapshot-baked /etc/ssh/ssh_host_* that cloud-init (ssh_deletekeys: true default) rewrote one second after sshd had already started — so sshd served an orphaned key until its first restart, which is enroll-activate's switch-to-configuration switch. Measured live on two rented droplets. Not disko drift (GOTCHAS #47 is not the cause); GOTCHAS #62 has the mechanism.

  2. Fix cause vs. add a host-key re-learn? Cause fixed, re-learn deliberately NOT added (no security-posture widening — it tightens, from one shared identity to one unique key per box): nix/gateway-image/configuration.nix pins ssh_deletekeys = false, scripts/gateway-image/build.sh scrubs host keys before snapshotting, guarded by internal/clan/gateway_image_hostkey_test.go.

The one-way-door decision this ticket was parked on (auto-accepting a changed key) is therefore moot. Closed by Ben.

Closing — both questions this ticket asked were answered and resolved by #707 (commit `d62a7252`, closed 2026-08-23 15:55Z), superseding the need for a separate live reproduction here. 1. **Did the box reboot?** No. `rentedpath.go`'s no-reboot contract held. The host key "changed" because the gateway image shipped with a shared, snapshot-baked `/etc/ssh/ssh_host_*` that cloud-init (`ssh_deletekeys: true` default) rewrote one second after sshd had already started — so sshd served an orphaned key until its first restart, which is `enroll-activate`'s `switch-to-configuration switch`. Measured live on two rented droplets. Not disko drift (GOTCHAS #47 is not the cause); GOTCHAS #62 has the mechanism. 2. **Fix cause vs. add a host-key re-learn?** Cause fixed, re-learn deliberately NOT added (no security-posture widening — it tightens, from one shared identity to one unique key per box): `nix/gateway-image/configuration.nix` pins `ssh_deletekeys = false`, `scripts/gateway-image/build.sh` scrubs host keys before snapshotting, guarded by `internal/clan/gateway_image_hostkey_test.go`. The one-way-door decision this ticket was parked on (auto-accepting a changed key) is therefore moot. Closed by Ben.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#701
No description provided.