rehearsal second-executor residue: DO SSH-keypair checklist line + build.sh fails loud before renting a droplet it cannot enter #856

Closed
opened 2026-08-25 20:31:44 +00:00 by ben · 2 comments
Owner

Why (split from #659, Ben's ruling 2026-08-25)

#659's provisioning half is delivered — elitebook-03 is live and drove #652 + #720 to green. What remains is the lesson from the live gap Ben found 2026-08-22 (recorded on #659): swarm@elitebook-03 had no SSH keypair, so the #661 auto-rebuild's build.sh could not reach its build droplet — wait_ssh burned 5 minutes of Permission denied (publickey), logged "build droplet never answered SSH", deleted the droplet, and parked the drive. Two attempts (~20 min of droplet time) burned before the cause was found by hand.

What to do

  1. Runbook: the second-executor checklist (the provisioning steps #659 carries; land them wherever the executor runbook lives, e.g. docs/operator-app/rehearsal-drive.md's executor section) gains the line: "the executor host needs an SSH keypair registered at DO (doctl compute ssh-key create <host> --public-key ...)" — the same shape as the workstation's matou-workstation key.
  2. Fail loud up front: the auto-rebuild's build.sh refuses at second 0 when the host has no usable keypair registered at DO, naming the fix — instead of renting a droplet it can never enter and discovering the wall via a 5-minute wait_ssh timeout.

Acceptance

  • The checklist line exists in the runbook and names the doctl command.
  • build.sh on a host with no DO-registered keypair exits non-zero before creating any droplet, and its message names the missing key and the registering command.
  • A host WITH a registered key behaves exactly as before (the green path is untouched).
## Why (split from #659, Ben's ruling 2026-08-25) #659's provisioning half is delivered — elitebook-03 is live and drove #652 + #720 to green. What remains is the lesson from the live gap Ben found 2026-08-22 (recorded on #659): `swarm@elitebook-03` had **no SSH keypair**, so the #661 auto-rebuild's `build.sh` could not reach its build droplet — `wait_ssh` burned 5 minutes of `Permission denied (publickey)`, logged "build droplet never answered SSH", deleted the droplet, and parked the drive. Two attempts (~20 min of droplet time) burned before the cause was found by hand. ## What to do 1. **Runbook:** the second-executor checklist (the provisioning steps #659 carries; land them wherever the executor runbook lives, e.g. `docs/operator-app/rehearsal-drive.md`'s executor section) gains the line: *"the executor host needs an SSH keypair registered at DO (`doctl compute ssh-key create <host> --public-key ...`)"* — the same shape as the workstation's `matou-workstation` key. 2. **Fail loud up front:** the auto-rebuild's `build.sh` refuses at second 0 when the host has no usable keypair registered at DO, naming the fix — instead of renting a droplet it can never enter and discovering the wall via a 5-minute `wait_ssh` timeout. ## Acceptance - [ ] The checklist line exists in the runbook and names the doctl command. - [ ] `build.sh` on a host with no DO-registered keypair exits non-zero before creating any droplet, and its message names the missing key and the registering command. - [ ] A host WITH a registered key behaves exactly as before (the green path is untouched).

swarm-claim host=elitebook-distributed-server-03 run=10096
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=10096 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #856 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 856,
  "status": "success",
  "commits": [
    "1b45f6b428a9e55badaa7c640ce009d034670f02"
  ],
  "changed_files": [
    "scripts/gateway-image/preflight-ssh-key.sh",
    "scripts/gateway-image/build.sh",
    "scripts/gateway-image/tests/preflight-ssh-key-test.sh",
    "docs/operator-app/rehearsal-drive.md",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "bash scripts/gateway-image/tests/preflight-ssh-key-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/gateway-image-rebuild-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/gateway-image/tests/gateway-image-staleness-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The checklist line exists in the runbook and names the doctl command": "docs/operator-app/rehearsal-drive.md executor checklist: 'doctl compute ssh-key create <host> --public-key \"$(cat ~/.ssh/id_ed25519.pub)\"' (matou-workstation shape)",
    "build.sh on a host with no DO-registered keypair exits non-zero before creating any droplet, naming the missing key and the registering command": "scripts/gateway-image/preflight-ssh-key.sh dies non-zero naming the key + 'doctl compute ssh-key create <host>'; build.sh calls it after the tree-clean check and BEFORE the droplet create (set -e propagates). Test cases 2/3/4 in preflight-ssh-key-test.sh",
    "A host WITH a registered key behaves exactly as before (green path untouched)": "preflight exits 0 with one stderr info line when a local fingerprint is in doctl's list; build.sh proceeds unchanged. Test case 1"
  },
  "summary": "gateway-image build.sh now refuses at second 0 when the executor host has no DO-registered SSH keypair, naming the fix, and the runbook's executor checklist carries the keypair-registration line.",
  "blockers": []
}
**close-report** for #856 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 856, "status": "success", "commits": [ "1b45f6b428a9e55badaa7c640ce009d034670f02" ], "changed_files": [ "scripts/gateway-image/preflight-ssh-key.sh", "scripts/gateway-image/build.sh", "scripts/gateway-image/tests/preflight-ssh-key-test.sh", "docs/operator-app/rehearsal-drive.md", "STATUS.md" ], "tests": [ { "command": "bash scripts/gateway-image/tests/preflight-ssh-key-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/gateway-image-rebuild-test.sh", "exit_code": 0 }, { "command": "bash scripts/gateway-image/tests/gateway-image-staleness-test.sh", "exit_code": 0 } ], "criteria": { "The checklist line exists in the runbook and names the doctl command": "docs/operator-app/rehearsal-drive.md executor checklist: 'doctl compute ssh-key create <host> --public-key \"$(cat ~/.ssh/id_ed25519.pub)\"' (matou-workstation shape)", "build.sh on a host with no DO-registered keypair exits non-zero before creating any droplet, naming the missing key and the registering command": "scripts/gateway-image/preflight-ssh-key.sh dies non-zero naming the key + 'doctl compute ssh-key create <host>'; build.sh calls it after the tree-clean check and BEFORE the droplet create (set -e propagates). Test cases 2/3/4 in preflight-ssh-key-test.sh", "A host WITH a registered key behaves exactly as before (green path untouched)": "preflight exits 0 with one stderr info line when a local fingerprint is in doctl's list; build.sh proceeds unchanged. Test case 1" }, "summary": "gateway-image build.sh now refuses at second 0 when the executor host has no DO-registered SSH keypair, naming the fix, and the runbook's executor checklist carries the keypair-registration line.", "blockers": [] } ``` </details>
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.

Dependencies

No dependencies set.

Reference
Matou/idss#856
No description provided.