readiness probe fails an ACTIVE control-plane on ssh's known-hosts warning — own-vps dir never created in VM mode #561
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#561
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
2026-08-15 drive (post-#558): the entire gateway deploy succeeded — closure pushed, both sops uploads authenticated, boot+switch applied twice,
ourcloud-control-plane.servicegenuinely active — and the control-plane row still failed, at the last possible moment, on its own readiness probe:Read it closely: the ssh command returned no error (
<nil>) and its stdout wasactive— the probe's true answer. The "failure" is ssh's benign stderr warningFailed to add the host to the list of known hosts, printed because the #458-pinned known-hosts path's parent directory (~/.config/Electron/own-vps/) does not exist on a fresh VM-mode drive — nothing in the VM path creates it, andaccept-newcannot append into a missing directory.Cause — two stacked defects
activemust classify as active; ssh stderr noise (host-key bookkeeping warnings) is not part of the answer. (Same family as #549's scanner-vs-noise lesson, different code path.)Workaround used mid-drive
mkdir -p ~/.config/Electron/own-vpsand one manual probe to record the host key — after which the probe runs clean and Retry proceeds. A fresh state home will reproduce the failure every time until fixed.Proof
Fresh tier-1 wipe (state home has no
own-vps/), drive founding: the control-plane row's readiness probe passes on first attempt. Unit test: probe classification with exit 0, stdoutactive, stderr carrying the known-hosts warning → active.Redundancy check: searched
internal/clan/adapter.go(Adapter.UnitActive,execSSH) andapp/helper/cmd/helper/wiring_prod.go(ownVPSKnownHostsPath) — both defects are live on main; neither is fixed..out-of-scope/doesn't exist yet, so no prior rejection to check.Verified:
execSSH(internal/clan/adapter.go) runs ssh viaCombinedOutput(), merging stdout+stderr into one blob;UnitActiveexact-matches that blob against"active"/"inactive"/"failed", so any stderr line (like ssh's known-hosts warning) makes a genuinely active unit fail the probe — reproduces the issue's exact error shape (warning line followed by the realactiveverdict, both folded together). Separately,ownVPSKnownHostsPath()builds the pin path but nothingMkdirAlls its parent directory before ssh's first accept-new write, and this path is shared unconditionally by every founding journey (VM/private, own-VPS, rented) via the one clan adapter wired at the founding face's construction — no per-journey branch exists.Precedent for the fix shape: #549 (
internal/clan/errors.go'slogSaysFailed) established that a probe's real verdict must be read separately from incidental noise lines, never via blanket stderr suppression — same pattern applies here (classify on stdout+exit code, don't fold streams).Defect 2 isn't a genuine two-way judgment call: giving VM mode its own host-key source would mean threading a new per-journey known-hosts choice through
newClanAdapter's single call site (a real design change, unimplemented today), whereas creating the directory before first use is a one-line, zero-risk fix that covers every fresh-state-home journey. Routing to an agent with that as the steered default, per the issue's own "Proof" acceptance criteria.Agent Brief
Category: bug
Summary: Founding's control-plane readiness probe fails a genuinely ACTIVE unit because ssh's benign known-hosts warning gets folded into the verdict, and the own-VPS known-hosts pin's directory is never created ahead of a fresh drive.
Current behavior:
Adapter.UnitActiverunssystemctl is-active <unit>over ssh throughAdapter.sshRun; the production implementation merges stdout and stderr into one combined stream beforeUnitActiveclassifies it. Any stderr noise — such as ssh'sFailed to add the host to the list of known hostswarning — breaks the exact-match against"active", so the probe reports failure even when the unit truly is active and stdout truly wasactive. Separately, the own-VPS known-hosts pin path (used unconditionally by every founding journey, not just real droplets) has no parent directory created before ssh first writes a host key into it with accept-new pinning; on a fresh state home the directory doesn't exist, ssh can't write, and that failed write is exactly the stderr noise breaking the probe above.Desired behavior:
The readiness probe classifies strictly on the ssh command's real signal — exit code and stdout — never on stderr content. Incidental stderr (host-key bookkeeping warnings, etc.) must not turn an active unit into a probe failure, while a real failure (unit inactive/failed, or a genuine ssh error) must still fail loud. Independently, the own-VPS known-hosts pin's parent directory exists before its first use on every drive, including the very first drive against a brand-new state home — no manual
mkdirworkaround should ever be required.Key interfaces:
Adapter.sshRun/ the production ssh execution path — currently merges stdout+stderr via a combined-output call; needs to make stdout available to the caller separately from stderr so classification only ever looks at stdout.Adapter.UnitActive's classification logic — must key off stdout alone.ownVPSKnownHostsPath()and its wiring at the founding face's construction — the directory containing this path must exist (create it, private mode) before first use, rather than assuming it's already there.Acceptance criteria:
active, stderr carrying a known-hosts warning → probe classifies active.own-vps/directory yet) → a founding drive's control-plane readiness probe passes on the first attempt, no manualmkdirneeded.Out of scope:
Claimed: being fixed directly in Ben's manual session (2026-08-15) — probe verdict from last output line + own-vps dir creation at pin construction. Swarm workers: skip.