v0.95.0: enrollment wizards use the raw-device scan /disks/candidates (Impl-2b)
Both wizards now source candidates from the agent's Impl-2a raw-device scan (GET /disks/candidates, proxied) instead of the Observe-based /api/disks — so a brand-new non-PVE-storage drive is finally discoverable + enrollable end-to-end. agentapi.ListCandidates + a passthrough proxy (no controller-side filtering; the agent's unclaimed filter is authoritative). storage_init renders `initialize`, storage_attach renders `attach`; the enroll flow + Impl-1 guarded mkfs unchanged. Tests + go build/vet/test clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,30 @@
|
||||
## Changelog
|
||||
|
||||
### v0.95.0 — enrollment wizards use the raw-device scan `/disks/candidates` (Impl-2b) (2026-07-01)
|
||||
|
||||
Final drive-enrollment piece: both enrollment wizards now source candidates from the agent's Impl-2a
|
||||
raw-device scan instead of the `Observe()`-based `/api/disks` list — so a brand-new (non-PVE-storage)
|
||||
drive is finally visible + enrollable end-to-end. The enroll flow (`runStorageInit`/`runStorageAttach`)
|
||||
and the Impl-1 guarded `mkfs` are UNCHANGED; the wizards just get the right candidate list.
|
||||
|
||||
- **`internal/agentapi/client.go`:** `ListCandidates(ctx) (CandidatesResult, error)` → agent
|
||||
`GET /disks/candidates`; types `CandidatesResult{Initialize,Attach []DiskCandidate}` +
|
||||
`DiskCandidate{Device,SizeBytes,Model,FSType,DataBearing,Mountable,MountSource,DurableID}` mirroring
|
||||
the agent's `candidates.go`.
|
||||
- **`internal/web/agent_disk_handlers.go`:** `GET /api/disks/candidates` proxy
|
||||
(`agentDiskCandidatesHandler`, copy of `agentDisksListHandler`) — passthrough, NO controller-side
|
||||
filtering (the agent's unclaimed-disk filter is authoritative + fail-safe).
|
||||
- **`templates/storage_init.html`:** fetch `/api/disks/candidates` → render the `initialize` list
|
||||
(model/size/current-FS + a data-bearing marker); dropped the client-side "already-managed" filter
|
||||
(the server list already excludes OS/enrolled/claimed disks). Data-bearing → the existing wipe-confirm.
|
||||
- **`templates/storage_attach.html`:** fetch `/api/disks/candidates` → render the `attach` list
|
||||
(mountable-FS disks); selecting posts the FS-bearing node + its fstype to the existing
|
||||
`/api/storage/attach` (mount + bind, NO format).
|
||||
- **TOCTOU:** the wizard trusts the agent's Impl-1 `Format` guard as the backstop (re-checks unclaimed at
|
||||
format time), not the list's freshness — a device claimed between scan and enroll is refused.
|
||||
- Tests: `agentapi` `TestListCandidates` + `_Error`. `go build/vet/test ./...` clean. Live end-to-end
|
||||
raw enrollment of `/dev/sdd` validated through the real UI (see REPORT).
|
||||
|
||||
### v0.94.0 — pull-based config-refresh (re-pull controller.yaml + self-restart on a config change) (2026-06-30)
|
||||
|
||||
Config delivery is now pull-based, riding the report ACK exactly like the Phase 2 version floor — the hub
|
||||
|
||||
Reference in New Issue
Block a user