Why the rented droplet from drive 20260823T104013Z never came back on SSH after enroll-activate's verify() — live-droplet forensics needed (follow-on to #702) #703
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
2 participants
Notifications
Due date
No due date set.
Depends on
Reference
Matou/idss#703
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?
Context
#702 settled the reboot-vs-no-reboot contradiction definitively from clan-core's own source (
clan_lib/machines/update.py,_nixos_activate):clan machines update(VMMode) never reboots the target under any path, andverify()'s shared blocked-remedy text has been fixed to stop claiming a reboot for a mode that never has one. That fix is landed and closed under #702.What #702 did not resolve, and could not resolve without live infrastructure, is the deeper question its title also raised: why did the droplet from drive
20260823T104013Z(209.38.89.240) never answer SSH again, through every post-hoc probe (droplet-journal.txt,droplet-units.txt,droplet-caddy.txtall showConnection timed out)?What #702 newly established (read this before investigating)
Reading clan-core's
_nixos_activateclosely surfaced something that changes the shape of this investigation: it wraps the liveswitch-to-configuration switchinsystemd-run --pipe --wait --collect, specifically (per its own docstring) "so the activation survives SSH connection drops" — the transient unit is systemd-managed on the TARGET box, decoupled from the invoking SSH session's process group.This means our own
defaultPhaseTimeout(internal/clan/enrollment.go:67, 20 minutes) SIGKILLing the LOCALclan machines updateprocess likely does not stop the REMOTE activation at all. The box's fate may already have been sealed server-side, independent of our local wait. Two consequences for whoever picks this up:defaultPhaseTimeout/theenroll-activatePAIR_FRONTIERceiling (mirroring the #698 enroll-copy precedent) fixes this. That precedent was a LOCAL transfer genuinely gated by local wall-clock; this is a REMOTE detached unit whose completion is not gated by how long our local process waits. A timeout bump is not evidenced to help and could plausibly make things worse (a re-drive firing a SECONDswitch-to-configurationagainst a still-running first one on re-drive — a new, not-yet-reproduced hazard; see GOTCHAS #62).DiskoLayoutdrift bricking the box on reboot) is checked and ruled out for this failure shape, same as #700's analogous case:TestGatewayImageDiskoMatchesRenderDiskois green, and there is no reboot in this path anyway (see above) so #47's specific reboot-triggered-bootloader-mismatch mechanism cannot be it.What needs live-droplet access to settle
The interrupted
founding-state.logtail showed normal in-progress activation output right up to the kill:sops-install-secretskey imports, then[gateway] NOT restarting the following changed units: systemd-fsck@dev-disk-by\x2dpartlabel-disk\x2dmain\x2dESP.service, …andFailed to reload user unit dbus-broker.service. That last line is the most concrete lead — a reload failure on a live system service during activation is a plausible mechanism for a box losing network/sshd reachability without any reboot or disko involvement at all, but this cannot be confirmed from a killed log's tail.A future
ready-for-sessionrun should, on a fresh rented drive reachingenroll-activate:defaultPhaseTimeoutlocally (diagnostic-only, not a production change) to let the LOCAL wrapper wait past 20m without killing its own view of the process, to observe directly whether the remoteclan machines updateactually completes, hangs, or errors — testing the systemd-run-detachment hypothesis above head-on; orenroll-activaterun, which is the only way to see what happened on-box if our local process has already given up.This is
ready-for-sessionwork (host/droplet standing, not a Ben-specific judgement call) per ADR 0174 rule 5 — no one-way door is anticipated yet, but the live evidence gathered may surface one (e.g. if the root cause turns out to need a security-posture change).Proposed default ruling
None yet — this ticket is scoped to gather live evidence first; a concrete fix ruling should follow once the mechanism is known.
clan machines update, and the droplet never comes back — reboot-vs-no-reboot contradiction (follow-on to #700)clan machines update, and the droplet never comes back — reboot-vs-no-reboot contradiction (follow-on to #700) #702New evidence from #704 (drive
20260823T115746Z), advances #703A second independent instance of this mystery, one stage later than #702's
enroll-activatered: the deploy's ownapplyControlPlanereconciled successfully (noclan.DeployError), but the FOLLOW-UPprobeControlPlaneActivere-probe ofidss-control-plane.servicethen failed all 6 attempts. The persisted failure tail is a raw OpenSSH refusal —REMOTE HOST IDENTIFICATION HAS CHANGED!— against the app-scopedknown_hosts, which held exactly ONE (freshly-learned, non-stale) entry for this host. That rules out a recycled-IP artifact: the key genuinely changed during this drive, between the earlierconnectleg (which pinned it fine) and this post-deploy probe. By the time post-drive evidence-gather ran, the box (170.64.230.22) was fully unreachable (Connection timed out), not just key-refusing.This is direct, now-twice-reproduced proof that the box's presented SSH identity moves across this deploy despite
rentedpath.go's documented no-reboot / no-RotateHostKeyVMMode contract — the exact mechanism this ticket is scoped to chase live. Folded intodocs/GOTCHAS.md#62 as a second data point.Also fixed while investigating (ruled by agent under ADR 0174 — two-way door, revertible, proven by shell tests): checked
#704's own droplet via the DigitalOcean API and found it already gone (zeroidss-gateway-tagged droplets live). Root cause:oc_rented_teardown(scripts/lib/rehearsal-droplet.sh) was unconditionally reaping the rented droplet on every red drive — unlike the clan-lab target's existingREHEARSAL_KEEP_RED_DROPLETkeep-on-red contract (#412) — so a reproducing box was destroyed before anyone could ever pull its console, independent of whether a human or an agent session was watching.oc_rented_teardownnow honours the same flag (skips the broker release + fallback reap on a red drive, still offboards the subdomain, still TTL-reaped by the broker per GOTCHAS #48). Commit20a342df.What this means for whoever picks up #703's live-forensics work next: set
REHEARSAL_KEEP_RED_DROPLET=1on the next rented drive that reproduces this — the box will now stay up (broker TTL is the failsafe) long enough to actually pull the DO console, instead of being auto-destroyed before anyone can look, which is what happened to both this drive's box and the earlier20260823T104013Zone.Ruled by agent under ADR 0174 — veto anytime.
Close report — settled live, fixed, and proven
The answer: the box was never hung, never crashed and never rebooted. Its
own activation took the NIC away from it. The deployed VMMode config drops
networking.useNetworkdandservices.cloud-init, soswitch-to-configurationstops networkd and hands the interface to scripteddhcpcd— which solicits a lease nothing on DigitalOcean answers (DO handsout a static address), falls back to IPv4LL and installs its own default
route over the real one. The box keeps its public address and a healthy
sshd, and every reply leaves via a link-local default and is dropped. Fromoutside that is exactly
Connection timed out, forever — and it also explains#702's 20m
defaultPhaseTimeoutburn: our wrapper was waiting on a box thatcould no longer answer anyone.
The measurement (live, two droplets rented from
idss-gateway-01eedc890405)Switching a live rented droplet onto the exact
renderVMGuestBaselinetext,under clan-core's own
systemd-run --pipe --wait --collectshape:Last state seen off-box:
sshd=active networkd=inactive dhcpcd=active, address170.64.163.194/20still present, anddefault dev ens3 scope link src 169.254.191.197wheredefault via 170.64.160.1 proto staticused to be. Reproduced twice; theactivation output matched #702's
founding-state.logtail line for line,including the ESP
systemd-fsck"NOT restarting" line.Why the two sides disagreed
nix/gateway-image/configuration.nix) runs cloud-init withnetworking.useNetworkd = true, and DO's metadata is static: cloud-initwrites
/etc/systemd/network/10-cloud-init-ens3.networkwithDHCP=no, anAddress=and a[Route] Gateway=.renderVMGuestBaseline, which MIRRORS the QEMUguest image and declares neither — correct for a QEMU guest whose user-net
really serves DHCP, fatal on a droplet. The rented path bakes it verbatim:
enrollment.go's configure stage takes thes.NodeConfig == nilbranch, sono
networking.nixis rendered at all.What landed — commit
458d006arenderGatewayGuest's public branch (g.Public != nil, the rented shape'sexisting signal) now splices
rentedHostNetworking():networking.useNetworkd = true+services.cloud-init(carrying #707'sssh_deletekeys = false, so enabling cloud-init here can never re-open thehost-key flip GOTCHAS #63 closed). It mirrors the image's own proven lines
rather than inventing a shape. The PRIVATE VM guest deliberately does not gain
it, so the QEMU path is untouched.
Proof, three ways:
TestRenderGatewayGuest_PublicGatewayKeepsNetworkdAndCloudInit— red before,green after, and it also pins that the private guest does NOT gain the block.
TestRentedGateway_EvalSmoke(IDSS_EVAL_SMOKE=1) green — a realnix evalof the whole rented gateway against clan-core's own nixpkgs (26.11), the
rev the fleet actually deploys, so the options resolve there and not just on
the image's 24.11.
switch-to-configurationfinishes in 2.1s with
result: success, theproto staticdefault routesurvives, and SSH/ICMP never drop — where the unfixed config had gone dark
within 14 seconds.
gofmt,go vetand the fullinternal/...suite green. GOTCHAS #64added; #62's and #63's open cross-references to this ticket are now answered in
place. STATUS.md header updated.
Answering this ticket's two proposed approaches
Neither was needed, and the first would have misled. Patching
defaultPhaseTimeoutcould never have helped — the remote unit was not stillworking, it had finished the step that killed reachability. And DigitalOcean
exposes no console-log API (the console is an interactive web VNC), so
"capture the droplet's console log" is not scriptable from a session. What
worked instead, and is now written into GOTCHAS #64 as method: stream the
evidence off-box before breaking it (
journalctl -f+ atail -Fsampler,both redirected to local files), enable a persistent journal, and use
switch-to-configuration **test**rather thanswitch—testleaves thebootloader and system profile alone, so a DO
power_cyclerecovers the box andjournalctl -b -1still has everything. The droplet given a realswitchnevercame back from its power cycle; the one given
testcame back in under aminute.
Filed, not fixed here — #710
The same baseline declares
fileSystems."/" = "/dev/disk/by-label/nixos", thelabel
make-disk-imageputs on the QEMU qcow2. A rented droplet's disko root is/dev/vda1,PARTLABEL=disk-main-root, with no filesystem label (ls /dev/disk/by-label/shows onlyconfig-2), and the deployed system's/etc/fstabreally does read that missing device; its grub also drops theimage's
efiSupport/efiInstallAsRemovable. VMMode never reboots, so it bitesthe first restart after a drive, not the drive — a latent brick that changes
what the box boots and wants its own live proof, so it gets its own
ready-for-sessionticket rather than a same-session second change.Housekeeping
Both forensics droplets destroyed and the ephemeral DigitalOcean SSH key
deleted; nothing left running. No
REHEARSAL_KEEP_RED_DROPLETdrive was neededin the end — the targeted rentals answered the question faster and more
precisely than waiting for a red drive to reproduce.
Ruled by agent under ADR 0174 — veto anytime. Two-way door throughout: one
revertible render change, proven by a Go contract test, a real nix eval on the
deploy rev, and a live before/after on rented droplets. No security-posture
change — cloud-init was already running on these boxes, and #707's key pin rides
along with it.