Repository navigation
A/B OS image: a slot that hangs, and a Debian major across /etc (#486) - #580
Conversation
Point 3 (a slot that hangs): Hetzner Cloud VMs are QEMU q35 with the ICH9 TCO watchdog, which the image's generic kernel drives. Proved on real cx23 VMs: a frozen PID 1 reset the VM after 118 s. No image change; every boot of the lane now checks systemd feeds the watchdog. Point 5 (a Debian major): when the slot's major differs from the one the state partition records, state-setup tidies the /etc upper layer before it mounts it: the keep list stays, the account files are merged, the pinned files are taken again from the slot when the remap stays, the rest moves to an attic. A failure never stops a boot. host-agent turns sshd back on at start when the drop-in names an account. The image's accounts become a generated sysusers.d file, with ids checked against dev/os-lock/cloud-accounts.lock. The os-update boot fakes a major, and every boot fails on an upper-layer file no rule covers. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ap; sshd re-enabled only after a tidy-up Review round 1 on #580. Co-Authored-By: Claude <noreply@anthropic.com>
|
Co-Authored-By: Claude <noreply@anthropic.com>
…ert direction Greptile on #580: an admin's sshd off stays off after a major, and the revert direction (newer record, older slot) is now crossed in os-revert. Co-Authored-By: Claude <noreply@anthropic.com>
| if [ -n "$sshd_on" ]; then | ||
| touch "$TIDIED_MARKER" 2>/dev/null || log "tidy-up: could not leave $TIDIED_MARKER for host-agent" | ||
| else | ||
| rm -f "$TIDIED_MARKER" |
There was a problem hiding this comment.
SSH stays off after interruption
If power is lost after the tidy-up swaps the /etc upper layer but before it records the new Debian major, the next boot repeats the swap. The first swap removes the SSH enable link and leaves a marker for host-agent. The second sees no link and deletes that marker. host-agent then leaves SSH off even though the owner had enabled it. Keep the pending marker when a swap is retried.
Knowledge Base Used: Immutable image layout and boot
There was a problem hiding this comment.
Valid. Fixed in 6fd8006: a swap no longer removes an existing marker. It only creates one when the old layer had ssh.service enabled. A repeat swap after a power cut (before the record) now keeps the marker from the first swap, so host-agent still turns sshd back on once. A stale marker cannot turn sshd on against an admin's choice, because host-agent consumes it at its first start after the boot that wrote it.
Co-Authored-By: Claude <noreply@anthropic.com>
A slice of #486. It settles points 3 and 5 of
NEXT.md# A/B OS image. Readdocs/progress/ab-hang-and-major.mdfirst.Point 3: a slot that hangs
q35, and its ICH9 chipset has a TCO watchdog. Debian's-cloudkernel has no driver for it, but the image runs the genericlinux-image-amd64, whoseiTCO_wdtdrives it, and systemd feeds it (RuntimeWatchdogSec=60s, already in the image).q35too, soBUILD.md's "none in the QEMU lane" was wrong.BUILD.md# 1b # As built: the reset comes after about twice the timeout (about 2 min), and a hang in GRUB or the initramfs is not covered (the watchdog is not started earlier, so a longe2fsckcannot reset a box again and again). No hang proof in CI, by decision: the Hetzner probe is the proof.Point 5: a Debian major across the /etc overlay
DECISIONS.md2026-10-05,BUILD.md# 1b rule 4.state-setuprebuilds the/etcupper layer before it mounts/etc:/usr/lib/moose/etc-keep.liststay;passwd,group,shadowandgshadoware merged;daemon.jsonandlogin.defsare taken again from the slot when the remap stays;host-agentturns sshd back on at start when the drop-in names an account (sshaccess.EnsureOnAtStart). It never turns sshd off.sysusers.dfile. Build check 6 fails when an id differs fromdev/os-lock/cloud-accounts.lock, which is edited by hand.os-updateboot fakes a major (Debian 12 to 13) and checks the tidy-up.Costs
BUILD.mdand the cloud size table say. It is not 64 GB.os-updatestayed at 187 to 208 s.Proof
CI / Cloud imagerun 37378140993 on code headf7108c7: the full list, all 14 jobs green, 14.6 min wall. The commit after it changes only the progress entry.make test-nopamis green.Known gaps
softdogwhere it has no hardware watchdog. The tidy-up is not proved there yet.Co-Authored-By: Claude noreply@anthropic.com