The rented gateway's deployed config declares the QEMU guest's root fs and grub — a rented droplet that reboots never comes back (follow-on to #703) #710
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#710
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?
What
The rented (VMMode) gateway's deployed machine config declares a root filesystem
and a bootloader that only fit the QEMU guest image, not a rented
DigitalOcean droplet. VMMode never reboots (GOTCHAS #62), so this does not bite
the drive that deploys it — it bites the first restart after one, at which
point the box never comes back.
Found while settling #703's dark-box question live (GOTCHAS #64, commit
458d006a); deliberately left unfixed there because it changes what the boxboots and wants its own live proof, rather than riding a same-session second
change.
Evidence (live, 2026-08-23, droplets rented from snapshot
idss-gateway-01eedc890405)renderVMGuestBaseline(internal/clan/vmguest.go) — which the rented pathbakes verbatim via
renderGatewayGuest, sinceenrollment.go's configure stagetakes the
s.NodeConfig == nilbranch for VMMode and renders nodisko.nix—declares:
by-label/nixosis the labelmake-disk-imageputs on the QEMU guest's qcow2(see
flake.nix). On a live rented droplet:There is no
nixoslabel — the image's disko (nix/gateway-image/disko.nix)mounts by PARTLABEL. And the built system really does carry the missing device:
The image's own grub block, by contrast, sets
efiSupport = trueandefiInstallAsRemovable = truefor exactly the hybrid BIOS+UEFI layoutdisko.nixpartitions — the deployed config drops both.Corroborating (not isolating): the forensics droplet given a real
switch-to-configuration switch(bootloader + system profile updated) nevercame back from a DigitalOcean
power_cycle. That box's darkness is alsoexplained by #64's networking defect, so it does not by itself prove the
boot half — the
blkid/fstabmismatch above is the direct evidence.Why it matters
A community's rented gateway that reboots for any reason (provider maintenance,
an operator power-cycle, a kernel panic) lands in stage-1 waiting for a root
device that does not exist. This is GOTCHAS #47's failure shape reached by a
different route: #47 guards the image's disko against
DiskoLayout(
TestGatewayImageDiskoMatchesRenderDisko, green), but the rented path neverrenders
DiskoLayoutat all — it deploys the VM guest's by-label root instead,which no test compares against the image.
Likely shape of the fix
Give the rented shape its own host-level facts instead of the QEMU guest's, the
way #703's fix gave it its own networking: on
g.Public != nil, render theroot/boot facts the image actually has (
by-partlabel/disk-main-root, the ESPat
/boot, grub withefiSupport+efiInstallAsRemovable), and add acontract test that pins them against
nix/gateway-image/disko.nix+configuration.nixthe waygateway_image_disko_test.gopins the takeoverlayout — so the two can never drift silently again.
Must be proven live before it is believed: rent a droplet from the current
snapshot, deploy the changed config with
switch-to-configuration switch, thenpower_cycleit via the DigitalOcean API and confirm the box boots and answersSSH. Note DigitalOcean exposes no console-log API — see GOTCHAS #64's method
note for how to keep the evidence when a box goes dark (stream logs off-box,
persistent journal, and use
testrather thanswitchwhile probing).Close report — fixed and proven live
Ruled by agent under ADR 0174 — veto anytime. Two-way door: a revertible source change, proven by Go contract tests, a real
nix evalof the rented gateway toplevel, and a live rent → switch → power-cycle round trip on two throwaway lab droplets. No personal credentials, no security-posture widening, no data destroyed, routine lab-droplet spend (twos-2vcpu-4gbin syd1 for ~30 minutes, both destroyed).Commit
b7ac77fdonmain.What landed
renderGatewayGuest's public branch (g.Public != nil,internal/clan/vmguest.go) now STRIPS the VM-guest baseline'sboot.loader.grubblock and its root-filesystem block, and splicesrentedHostBoot()in their place — the boot-half sibling of #703'srentedHostNetworking:No
autoResize, noboot.growPartition— the image declares neither; DigitalOcean grows the root partition at snapshot restore and cloud-init'sgrowpartowns it thereafter. Confirmed against a live rented droplet's own fstab, which readsx-initrd.mount,defaultswith nox-systemd.growfs.The three baseline strips now go through a shared
stripBaselineBlock, which panics naming the block rather than silently no-op'ing if the baseline text ever drifts (the existing port-line discipline, extended to the two new strips).The PRIVATE VM guest is untouched — its disk really is the labelled qcow2 the baseline describes — and the warm-repo shape is byte-identical, so no closure churns.
The contract test
internal/clan/rented_boot_test.go→TestRentedGatewayBootFactsMatchTheImagereads the expected facts out ofnix/gateway-image/disko.nixandnix/gateway-image/configuration.nixrather than restating them: it derives each mounted partition's PARTLABEL from disko's owndisk-<disk>-<partition>scheme and pulls the grub block's attribute lines straight out of the image config. A rename, a reformat or a dropped ESP in the image now fails a Go test instead of a droplet. It is the boot-half sibling of #47'sTestGatewayImageDiskoMatchesRenderDisko, closing exactly the gap the issue named: the rented path never rendersDiskoLayout, so nothing compared what it deploys against what the image installed.A sibling test pins the private VM guest's QEMU facts so #710's change can never leak onto that path.
Red before / green after. Full
internal/clanandinternal/foundingsuites,go vet,gofmtclean, plusTestRentedGateway_EvalSmokerun for real (IDSS_EVAL_SMOKE=1, 33s) — the changed render still evaluates as a NixOS topleveldrvPath.Live proof — a controlled A/B
Two droplets rented from the current snapshot
idss-gateway-c21a86f4facc(syd1). Both were switched (switch-to-configuration switch) onto the same host-level config — including #64'srentedHostNetworkingblock, so the networking variable is held constant — differing only in the root/boot declarations, then power-cycled through the DigitalOcean API in the same second (power_cyclecompleted 18:39:17Z / 18:39:18Z).power_cycleclan-lab-i710fixby-partlabel/disk-main-root+ ESP at/boot/dev/disk/by-partlabel/disk-main-root / ext4 x-initrd.mount 0 1/dev/disk/by-partlabel/disk-main-ESP /boot vfat defaults 0 2clan-lab-i710ctlby-label/nixos/dev/disk/by-label/nixos / ext4 x-systemd.growfs,x-initrd.mount 0 1(no
/bootline at all)The fixed box, after the cycle:
Ping and SSH both green. The control box at 10 minutes: DigitalOcean reports the droplet
active,pingis 100% packet loss, SSH isConnection timed out. It never returned.One confounder checked and cleared:
cloud-final.servicewas alreadyfailedon the control box before its switch (pre-existing image behaviour, not caused by either config), and on the fixed box it passes after the reboot.Both droplets destroyed (
doctl compute droplet delete), no keys touched.Docs
Closing.