v0.78.0: storage register uses the STABLE intermediary path, not the raw path

handleStorageRegister (the "Regisztrálás" action for an already-mounted,
unregistered drive) registered the raw /mnt/<name> path verbatim, unlike
runStorageInit/runStorageAttach which map to the stable /mnt/felhom-drives/<name>
path the agent actually binds the drive at. The controller then watched an empty
placeholder dir on the guest rootfs → "Rendszermeghajtón" + stuck "activation
pending" banner after a re-provision.

Fix: register stablePathForName(path.Base(req.Where)); attachIntoGuest still uses
the raw path (the agent operates on raw). Test + red-proof added.

Diagnosis: felhom.eu/documentation/audits/DIAGNOSE-drive-bind-after-reprovision-2026-06-23.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PsnU2ASocYrvzqE82YDYW
This commit is contained in:
2026-06-23 17:28:07 +02:00
parent 66d84627b8
commit 68e7e07838
4 changed files with 124 additions and 35 deletions
+16
View File
@@ -1,5 +1,21 @@
## Changelog
### v0.78.0 — storage register: use the STABLE intermediary path, not the raw path (2026-06-23)
- **Bug:** `handleStorageRegister` (the "Regisztrálás" action for an already-mounted, unregistered drive)
registered the **raw** `/mnt/<name>` host path verbatim, unlike its siblings `runStorageInit`/
`runStorageAttach` which map through `stablePathForName` to the **stable** intermediary path
`/mnt/felhom-drives/<name>`. The agent binds the drive at the stable path (intermediary model), so the
controller ended up watching an empty placeholder dir on the guest **rootfs** → the drive showed as on
the system drive (**"Rendszermeghajtón"**, ~31 GB), `0 connected / N disconnected`, and the
**"… meghajtó aktiválásra vár"** banner never cleared (`registerStoragePath``EnsureUserdataSkeleton`
even `mkdir`'d those rootfs placeholders). Surfaced after a destroy+re-provision, where surviving host
mounts make "Regisztrálás" the natural action. Diagnosis:
`felhom.eu/documentation/audits/DIAGNOSE-drive-bind-after-reprovision-2026-06-23.md`.
- **Fix** (`internal/web/storage_handlers.go` `handleStorageRegister`): register
`stablePathForName(path.Base(req.Where))`, matching init/attach. `attachIntoGuest` still receives the
**raw** path (the agent operates on raw); the success log + JSON now report the stable path (+ raw).
Test: `TestHandleStorageRegister_RegistersStablePath` (+ red-proof). No other behavior changed.
### v0.77.0 — per-app open_path for the "Megnyitás" link (2026-06-23)
- The dashboard/deploy/app-info **"Megnyitás"** (open) button was hardcoded to the bare subdomain root
`https://{sub}.{domain}` for every app. Apps whose UI isn't at `/` (e.g. Gokapi redirects `/` away;