v0.56.0: resolve a raw enrolled drive's durable-id from the mount table

durableIDForMount was Observe-only, so a raw (non-PVE-storage) drive's enroll
intent + guest-bind went unrecorded ("durable-id unresolved") — it mounted+bound
but wasn't intent-tracked (RegistryKnownTargets skips intent==new). Fall back to
resolving the mount's device fs-UUID (HostReader.Mounts + ResolveUUID) →
uuid:<fs-uuid>, same scheme as Observe. Test + red-proof. Residual:
ReassertGuestBinds still Observe-based (raw guest-bind not re-asserted post-reboot).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 18:29:22 +02:00
parent 4f8d2fcb57
commit e593fb277a
4 changed files with 84 additions and 7 deletions
+19
View File
@@ -1,3 +1,22 @@
## v0.56.0 — record intent/guest-bind for a RAW enrolled drive (durableIDForMount fallback) (2026-07-01)
Surfaced by the first live raw enrollment (Impl-2b): a raw drive is not a PVE storage, so
`durableIDForMount` (Observe-based) returned "" for it → the enroll's intent + guest-bind recording
logged "durable-id unresolved" and silently skipped. Result: the drive mounted + bound + usable, but was
NOT intent-tracked (so `RegistryKnownTargets` — which gates on intent ≠ new — didn't health-track it) and
its guest-bind wasn't persisted.
- **`internal/localapi/disks.go` `durableIDForMount`:** after the Observe lookup, fall back to resolving
the fs-UUID directly from the mount table — the device mounted at `where` (via `HostReader.Mounts`) →
its by-uuid identity (`HostReader.ResolveUUID`) → `uuid:<fs-uuid>` (the SAME scheme Observe derives, so
intent keys stay consistent). Fixes intent recording (enroll/eject) AND guest-bind recording for raw
drives; the PVE-storage path is unchanged.
- Test `TestDurableIDForMount_RawFallback` (+ red-proof: Observe-only → ""). `go build/vet/test ./...` clean.
- **KNOWN residual (follow-up):** `ReassertGuestBinds` still builds its durable-id→mount map from Observe,
so a raw drive's guest-BIND is not re-asserted after a full host reboot (the drive still auto-mounts via
its `.mount` unit + is watchdog-tracked; only the in-guest bind re-assert is missed). Same Observe-
dependency class as the Impl-2a watchdog decoupling — to be extended to the guest-bind reconcile.
## v0.55.0 — raw-device discovery + registry-sourced drive tracking (Impl-2a) (2026-07-01)
Agent backend for drive enrollment (SPIKE-drive-enrollment §SQ1/SQ4/SQ5). Makes raw (non-PVE-storage)