docs: REPORT — storage lifecycle + acceptance sweep (agent half)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 20:42:04 +02:00
parent 1e205840dc
commit 437f096d9d
+39 -39
View File
@@ -1,45 +1,45 @@
# REPORT — intermediary-mount re-architecture (agent half) (2026-06-15) # REPORT — storage lifecycle completion + acceptance sweep (agent half) → v0.36.7 (2026-06-15)
## Type ## Type
Multi-commit build + live deploy + migration on the demo host (`felhom-pve`, guest 9201). Replaces the Lifecycle fixes + a full live acceptance sweep (incl. a real HOST REBOOT) on the intermediary-mount
per-drive `pct set -mpN` guest bind (reboot-to-activate; bricks when a drive is absent at boot) with a foundation. Built + Linux-gated + deployed to felhom-pve per commit. Pairs with controller v0.68.1. Full
single permanent **parent bind** `/mnt/felhom-drives` plus host-side drive hot-swaps underneath it. Pairs audit: `felhom.eu/documentation/audits/storage-lifecycle-acceptance-2026-06-15.md`.
with controller v0.67.5 + the app-catalog repoint. Design: `felhom.eu/documentation/audits/SPIKE-intermediary-mount-2026-06-15.md`.
## Shipped (agent), each built + Linux-gated (`go vet`/`go test ./...` green) + deployed to felhom-pve ## Shipped (agent), each green-gated + deployed
- **v0.33.0 — C1 net (transitional).** Pre-start PVE hookscript (`internal/guesthook`) creates host-root - **v0.36.0 — guest boot-id on /disks.** `guest_boot_id` = `<host-btime>-<guest-init-starttime>`: changes
placeholders for absent bind-mount sources so the guest always boots (fail-closed); decommission now on every guest/host boot, stable across a controller-only restart. Lets the controller deterministically
`pct set --delete`s the dead mp (`GuestBinder.DetachBind`). **Live-proven**: reproduced the C1 brick recreate drive-backed apps after a guest reboot (replaces a fragile container-uptime sample). Pure parser
(start exit 255) then the hook heal → clean boot. test + companion.
- **v0.34.0 — intermediary mechanism.** `EnsureSharedParent` (self-bind + `--make-shared` + boot unit), - **v0.36.1 — decommission keeps the raw mounted.** Decommission is now a LOGICAL retire (DetachDrive the
`AttachDrive`/`DetachDrive` (host `mount --bind <drive>/felhom-data` under the parent — propagates into bind under the parent; LEAVE the raw `/mnt/<name>` mounted), so one-click re-enroll re-binds the real
the running guest live, confined, fail-closed), `ReassertGuestBinds` rewritten as a host-side reconcile drive. The old raw-unmount orphaned a non-removable drive (re-enroll bound an empty dir). **Caught live
(no pct/reboot). `/disks` adds `GuestPath` + `BoundUnderParent`. **Live-proven**: the startup reconcile in E10.**
bound felhom-flash under the parent, propagating 3-hop into the controller container live. - **v0.36.2 — eject also keeps the raw mounted** (same fix, for the H1 disconnect→reconnect roundtrip).
- **v0.35.0 — guest-reboot re-propagation (load-bearing).** A guest's parent bind is NON-RECURSIVE, so a - **v0.36.3 — DetachDrive loop-umounts** ALL stacked binds (full detach → fail-close intact).
guest reboot leaves enrolled drives bound on the HOST but invisible in the fresh guest ns. `AttachDrive` - **v0.36.4 — mutex** serializes AttachDrive/DetachDrive (no TOCTOU double-bind race).
now takes `vmid`, checks `GuestSeesMount` (`/proc/<init-pid>/mountinfo`), and FORCE re-binds to re-fire - **v0.36.5 — AttachDrive normalizes to exactly one bind** (`countHostMounts`).
propagation; a 20s periodic reconcile self-heals guest reboots; `BoundUnderParent` reflects guest - **v0.36.6 — ROOT CAUSE of the double-bind:** the shared-parent self-bind inherited `/`'s shared peer
visibility. **Live-proven**: after a guest reboot the drive auto-re-propagated. group, so every drive bind propagated back and DOUBLED. `make-private` (own group) BEFORE `make-shared`.
- **v0.35.1 — host-boot ordering.** The shared-parent oneshot now `WantedBy=pve-guests.service` (pulled - **v0.36.7 — isolate the parent only on CREATE** (re-doing make-private/shared each reconcile churns the
in + `Before`-ordered) instead of the unreliable `multi-user.target`; `EnsureSharedParent` reinstalls peer-group id and orphans the guest's slave → propagation silently dies).
on content change. Unit verified reinstalled + enabled + runs (the actual host-reboot ordering is not
validated — the production demo host can't be rebooted).
Tests are non-hollow, each with a companion that fails the pre-fix/trivial impl (guesthook selector, Non-hollow tests + companions updated: decommission/eject keep the raw mounted (`d.unmountCalls==0` +
decommission `--delete`, `GuestAttach` uses host-side AttachDrive not legacy pct, host-side reconcile, DetachDrive called); the boot-id parser; etc.
GuestPath/BoundUnderParent reporting). Sudoers extended (`FELHOM_GUESTHOOK`, `FELHOM_INTERMEDIARY`).
## Live migration (guest 9201) + verification ## Acceptance sweep highlights (live)
felhom-flash (the drive with all 8 deployed apps) fully migrated to `/mnt/felhom-drives/felhom-flash`; - **HOST REBOOT live-validated (×2):** `journalctl -b` proves felhom-shared-parent FINISHED before
the legacy per-drive `mp2` deleted; **a guest reboot self-converges with no manual intervention** (agent pve-guests STARTED; the guest auto-started (onboot=1); both drives re-propagated; all 8 apps converged
re-propagates the drive, controller startup-recreates the apps onto it). End state: **25 containers via the gate with no manual intervention; data intact.
healthy** (komga's healthcheck is a pre-existing quirk), `/mnt/felhom-flash` gone from the guest, - Fail-close capability-proof (guest-root + root-app writes DENIED, no leak), confinement (both drives),
confinement intact (only `appdata/backups/media/userdata` cross in), data identical. felhom-usb (no two-drive isolation, eject/decommission/re-enroll roundtrips, rapid eject/reconnect (single bind after
deployed apps, stale `decommissioned` intent) left on its legacy bind — out of scope. the double-bind root-cause fix).
## Known residuals (documented, not blocking) ## End state
- Host-reboot ordering: unit fix shipped (v0.35.1) but not validated via an actual host reboot. Both external drives on the intermediary model, **single bind each**, propagation live, **25 containers
- Guest-reboot app recreate is state-sampled (controller side): an app cleanly stopped at the exact healthy**, felhom-flash default. agent v0.36.7 deployed (backups at /usr/local/bin/felhom-agent.bak-*).
sample instant may need one manual start (1/8 in one run). The deterministic fix is a guest-boot-id
signal (future). ## Known residuals
- Pre-start hook vs an agent restart can race the parent-bind churn (exit 255) — resolved by the
on-create-only isolation (parent no longer churned); operationally, don't restart the agent and reboot
the guest in the same instant.
- "Safely removable" fs-flush before a physical pull is the separate "remove from system" action's job.