From 326aa1ca17de8c6589a00795146e55e186ffbdd1 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Sun, 14 Jun 2026 17:52:26 +0200 Subject: [PATCH] docs(spike): decommission/migration feasibility (TASK B0) Report-only feasibility spike: data-move layer (controller, proven live), vestigial migrate button, self-serve POST /disks/decommission design, re-bind gap (intent-unaware ReassertGuestBinds + no GuestBindStore.Remove), soft-marker registry. Gates B1/B2. Co-Authored-By: Claude Opus 4.8 (1M context) --- ...SPIKE-decommission-migration-2026-06-14.md | 261 ++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 documentation/audits/SPIKE-decommission-migration-2026-06-14.md diff --git a/documentation/audits/SPIKE-decommission-migration-2026-06-14.md b/documentation/audits/SPIKE-decommission-migration-2026-06-14.md new file mode 100644 index 0000000..8d92711 --- /dev/null +++ b/documentation/audits/SPIKE-decommission-migration-2026-06-14.md @@ -0,0 +1,261 @@ +# SPIKE — Decommission / migration feasibility (2026-06-14) + +**Report-only. No feature code, no version bump.** GATE: B1/B2 do not start until the product owner +reviews these findings and picks the forks at the end. + +**Product decision (locked, restated):** storage decommission is **self-serve — NO operator signature**. +It is the customer's own drive; we warn (and offer migration) but do not gate on operator authorization. +Decommission is **non-destructive** — un-enroll + drop the guest bind; **data stays on the drive**. It must +**NOT** format/wipe — that remains the separate customer-confirmed wipe flow. + +Evidence is `file:line` + (live) where empirically checked on demo guest **9201** (host `felhom-pve`, +192.168.0.162). The legacy bare-metal `controller/docker-compose.yml` was NOT trusted — the real deploy is +the golden/bootstrap `docker run` in `felhom-agent/configs/build-golden.sh`. + +--- + +## Q1 — Data-move layer (controller vs agent) + +**The controller's actual /mnt mount** — `felhom-agent/configs/build-golden.sh:179-186`: + +``` +docker run -d --name felhom-controller --restart unless-stopped ... \ + -v /mnt:/mnt:rslave \ + -v /var/run/docker.sock:/var/run/docker.sock \ + "$IMAGE" +``` + +De-privileged (`build-golden.sh:176-178`: NO `--privileged`, no `/dev`, no `/etc/fstab`). The host pre-shares +/mnt so agent binds propagate in (`build-golden.sh:173-175`: `mkdir -p /mnt; mount --rbind /mnt /mnt; +mount --make-rshared /mnt`). + +**`rslave` is read-WRITE for file content.** `rslave` governs *mount-event propagation direction* (host→ +container only — the container can't mutate the guest mount tree), NOT file permissions. The bind has **no +`:ro`**, so reading/writing file *content* under /mnt is allowed. + +**Live proof (inside the `felhom-controller` container on 9201):** + +``` +$ docker exec felhom-controller sh -c '... write/read/delete a marker under each enrolled path ...' +== mount opts for /mnt == +/dev/mapper/pve-vm--9201--disk--0 /mnt ext4 rw,relatime,stripe=16 0 0 +-- writing /mnt/felhom-usb/.felhom-spike-marker -- +WRITE_OK / spike-1781452108 / DELETE_OK +-- writing /mnt/sys_drive/felhom-data/.felhom-spike-marker -- +WRITE_OK / spike-1781452108 / DELETE_OK +``` + +Both enrolled storage paths (`/mnt/felhom-usb`, `/mnt/sys_drive/felhom-data`) are writable+deletable from +inside the controller container. + +**Conclusion — chosen layer = CONTROLLER.** The controller already holds RW access to every enrolled drive +under /mnt, so it can perform an app's data move (`cp -a /mnt/X/... → /mnt/Y/...`) **itself**, in-process, +no agent round-trip for the bytes. The agent is needed only for the privileged side-effects that bracket the +move: **unmount** (eject/decommission) and **intent** recording. This matches the existing app-data backup +design (the controller already rsyncs between drives for Tier-2 off-drive copies). + +--- + +## Q2 — "Migrate" button state + +`controller/internal/web/templates/settings.html:337`: + +```html +📦 Összes adat átköltöztetése +``` + +**Vestigial.** It is a ``, not a `