v0.57.0 fixup: wire HostReader into the local-API server (was nil in prod)

buildLocalAPIServer never passed Options.HostReader, so s.host was nil — the
v0.56.0 durableIDForMount raw-mount fallback + the role gate's host classification
silently no-op'd. Wire storage.NewProcHostReader(). This makes the raw-drive
intent/guest-bind resolution actually fire live.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 21:18:21 +02:00
parent 67e2144f11
commit 6448b80361
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -11,6 +11,10 @@ re-mount (the drive would show "Leválasztva" in the controller).
the `/mnt/felhom-drives` bind (AttachDrive wants the raw path). Observe entries still win. Also: an
Observe failure is no longer fatal (fall through to the mount-table scan) so raw drives re-assert even
if the PVE view is momentarily unavailable.
- **Wiring fix (latent):** `buildLocalAPIServer` never passed `Options.HostReader`, so the local-API
server's `host` was nil in production — the v0.56.0 `durableIDForMount` raw fallback (and the role gate's
host classification) silently no-op'd. Now wired to `storage.NewProcHostReader()`. This is what makes
the v0.56.0 + v0.57.0 raw-mount resolutions actually fire live.
- `go build/vet/test ./...` clean. With v0.56.0 (guest-bind now RECORDED for raw drives) this closes the
reboot/reconnect guest-bind durability gap for raw drives end-to-end.
+1
View File
@@ -767,6 +767,7 @@ func buildLocalAPIServer(cfg config.Config, px *proxmox.Client, store *backup.St
Store: store,
Storage: observer,
DriveTargets: driveTargets, // Impl-2a: registry+units drives for the /disks view (union w/ Observe storages)
HostReader: storage.NewProcHostReader(), // Impl-2b: durableIDForMount raw-mount fallback + role gate
Tokens: tokens,
BackupCadence: cfg.Backup.BackupCadence(),
// Disk management (slice 8C): the privileged host surface + the data-bearing wipe gate.