v0.95.0: REPORT (overwrite) — SMART coverage live-verified (system SSD + USB → Rendben + models)
This commit is contained in:
@@ -1,105 +1,53 @@
|
||||
# REPORT — v0.94.0: serialize per-disk SMART into /disks (2026-07-24)
|
||||
# REPORT — v0.95.0: SMART coverage (spike fixes B+A) + device model (2026-07-25)
|
||||
|
||||
Part of the **disk-health** cross-repo train (agent v0.94.0 + controller v0.169.0/.1 + hub v0.73.1).
|
||||
Appended above the previous report (kept below).
|
||||
**Overwritten** per the standing rule. Part of the SMART-coverage task (agent v0.95.0 + controller
|
||||
v0.171.0); the R-50 island-bridge spike lives in felhom.eu.
|
||||
|
||||
**Baseline:** felhom-agent `c230258` (v0.93.0) → committed `21fee69` (v0.94.0). Re-verified clean at start.
|
||||
## Baseline → target
|
||||
felhom-agent `643899c` (v0.94.0) → committed **`ed97232`** (v0.95.0). Deployed to felhom-pve.
|
||||
|
||||
**Change (additive, backward-compatible; MinAgent floor unchanged):** `localapi.DiskInfo` gains
|
||||
`Smart *hub.SmartSummary \`json:"smart,omitempty"\``, copied from the target's already-computed
|
||||
Observe-time enrichment **only when `t.Smart.Health != ""`** — a zero-value summary (SMART never read)
|
||||
stays omitted so the controller sees "absent" and renders "Nincs adat". No new smartctl load, endpoint,
|
||||
or sudoers change. Files: `internal/localapi/disks.go`, `internal/localapi/disks_smart_test.go` (new),
|
||||
`CHANGELOG.md`, `CONTEXT.md`.
|
||||
## What shipped (additive; MinAgent unchanged; hub untouched)
|
||||
Implements `SPIKE-smart-coverage-2026-07-25.md` (both demo disks answer `smartctl -a -j` PASSED, but
|
||||
the agent never asked):
|
||||
- **Fix B — union-path SMART:** `storage.SmartReader.SMARTForBacking` (reuses `smartDeviceFor`) wired
|
||||
into the `/disks` union path via a localapi `Smart` seam (+ a `resolveStorageDevice` seam for
|
||||
testability). Registry/USB drives now get a real read. The watchdog `Known` path stays enrich-free
|
||||
(asserted: zero smartctl calls).
|
||||
- **Fix A — LVM/dm resolution:** `smartDeviceFor` resolves `/dev/dm-N` / `/dev/mapper/X` to the single
|
||||
backing whole disk via `/sys/block/<dm>/slaves` (recursive; **skips** on >1 physical disk). The
|
||||
builtin `local` dir on the LVM root gets a **SMART-only** device from its containing filesystem
|
||||
(`containingMountDevice`), gated to `catDir && backing=="" && reachable` — never touching
|
||||
`backing_device`/`durable_id` (the removable-safety guard stays intact).
|
||||
- **Model:** `SmartSummary.ModelName` captured from smartctl's `model_name`.
|
||||
- Fix C (`-d sat`) stays rejected — no sudoers/manifest change.
|
||||
|
||||
**Tests:** `TestDisks_SmartSerialized` (fixture target's SATA counters + temperature present; an
|
||||
absent-SMART target omits the field). Red-proof: drop the `di.Smart = &sm` copy → "smart not serialized"
|
||||
FAIL (confirmed). Full agent suite: 29 packages pass, 0 fail; build + vet clean.
|
||||
## Files
|
||||
`internal/hub/report.go` (ModelName), `internal/storage/smart.go` (parse model), `internal/storage/smartdev.go`
|
||||
(NEW: dm resolution + SmartReader + containingMountDevice), `internal/storage/observe.go` (smartDeviceFor dm
|
||||
branch, enrich smartHint, build hint), `internal/localapi/{server.go,disks.go}` (Smart seam + union read +
|
||||
resolve seam), `cmd/felhom-agent/main.go` (wire), CHANGELOG/CONTEXT/REUSE. New tests:
|
||||
`smartdev_test.go`, `observe_smart_test.go`, union-path test in `disks_smart_test.go`.
|
||||
|
||||
**Deploy + live validation (demo host `demo-felhom`):** the vacation note was stale — the agent is
|
||||
**up and reachable** (binds `192.168.0.162:8443`). Built `felhom-agent-0.94.0` (ldflags), scp'd,
|
||||
backed up `.bak-0.93.0`, `install`-ed, restarted → **active**, `--version` 0.94.0, capabilities 68/68
|
||||
degraded=0, local-api listening. **§13(1) live:** the authed `/disks` payload now carries the `smart`
|
||||
object — dir-backed targets show `smart.health` (UNKNOWN on this virtualized demo hardware), the USB
|
||||
(union-path) target omits it. The field is live end-to-end; the controller consumes it (see the
|
||||
controller REPORT). Binary published: image tag on the registry via the publish flow is a follow-up if
|
||||
a fleet-wide agent republish is wanted — the code + live-deployed binary on demo-felhom prove the field.
|
||||
## Tests + red-proofs (all recorded)
|
||||
`go build/vet/test ./...` — **29 packages pass, 0 fail.** Red-proofs verified then restored:
|
||||
- dm multi-disk guard (`len(disks)!=1`) → mirror-over-two-disks resolves instead of skipping → FAIL.
|
||||
- enrich `smartHint` fallback → system disk stays UNKNOWN → FAIL.
|
||||
- Fix-B union routing removed → union drive carries no SMART → FAIL.
|
||||
- Known-path-never-SMARTs asserted (zero calls; the "route Known through enrich" mutation would break it).
|
||||
|
||||
---
|
||||
## Deploy + LIVE acceptance (felhom-pve — REAL N100 hardware, not virtualized)
|
||||
Built `0.95.0` (ldflags), backed up `.bak-0.94.0`, installed, restarted → **active, 68/68 capabilities,
|
||||
listening**. `/disks` payload now carries real SMART + model for BOTH physical disks:
|
||||
- `local` (system SSD): `backing=''` yet **smart=PASSED, model="AirDisk 512GB SSD"** — Fix A resolved
|
||||
`/`→`pve-root`(LVM)→`sda`.
|
||||
- `47a3361a` (USB): `backing=/dev/sdb`, **smart=PASSED, model="TOSHIBA MQ04ABF100"** — Fix B.
|
||||
- `felhom-pbs`/`local-lvm`: UNKNOWN (logical; correctly excluded by the controller).
|
||||
|
||||
# REPORT — v0.93.0 publish train executed: built, published, vouched, deployed fleet-wide (2026-07-22)
|
||||
The controller v0.171.0 card on 9201 shows both with **real verdicts + human labels**:
|
||||
**"AirDisk 512GB SSD" → Rendben (34°C)** and **"TOSHIBA MQ04ABF100" → Rendben (30°C)** — the operator's
|
||||
"Nincs adat on a raw UUID" complaint is reversed. (A live FAILING/Figyelmeztetés verdict still needs a
|
||||
genuinely degrading disk — unit+red-proof covered.)
|
||||
|
||||
**The previous report's "NOT built or deployed" line dies here.** v0.93.0 (hyphen-free escrow
|
||||
wordlist, `a452dc33`, red-proofed 2026-07-21) is now the fleet agent. No code changed this train —
|
||||
this was the build/publish/deploy leg. Full operational record:
|
||||
`felhom.eu/documentation/pilot/RUNBOOK-publish-agent-0.93-2026-07-22.md`.
|
||||
|
||||
## Confirmed baselines (re-verified at live source before acting)
|
||||
|
||||
- `main` = `eba040d0` = origin/main, clean tree; v0.93.0 delta vs 0.92.1 = escrow code + tests +
|
||||
docs only, **no `configs/` change** → binary-only deploy (sudoers/wrapper untouched).
|
||||
- Both boxes 0.92.1 + active (hub `hosts` table AND direct `--version`); Day-0 manifest agent
|
||||
0.92.1/`7424bc1c…`; floor 0.156.0; hub 0.70.0; package `felhom-agent/0.93.0` = 404 pre-publish.
|
||||
|
||||
## Artifact
|
||||
|
||||
```
|
||||
AGENT_VERSION=0.93.0
|
||||
AGENT_SHA256=a68b2ff73200622ea9e23aed71a0a8ff885808626cab9e9d554a5a5df5ced28f (13 817 690 bytes)
|
||||
```
|
||||
|
||||
Built on DooPlex from `eba040d0` (`CGO_ENABLED=0`, ldflags version); published via
|
||||
`scripts/publish-agent.sh` (pre-delete 404 → PUT 201 → round-trip sha match); **sha-chain identical
|
||||
at three independent points** incl. an anonymous GET of the package URL.
|
||||
|
||||
## Tests
|
||||
|
||||
Green gate on the exact built HEAD: `go build ./... && go vet ./... && go test ./...` — green.
|
||||
**The formerly-flaky escrow package: `-count=10` fresh → 10/10 pass (135.2 s).** The ~1/5 flake WAS
|
||||
the hyphenated-word defect (see the 2026-07-21 report), so a clean 10× run is direct evidence the
|
||||
fix is in the built artifact.
|
||||
|
||||
## Manifest vouch (rule 1 — before any box moved)
|
||||
|
||||
Viktor saved Day-0 artifacts (password-gated UI, the train's one STOP); CC verified in the live hub
|
||||
DB before deploying: agent **0.93.0 / a68b2ff7…**. Golden, floor and wrapper sha **byte-identical
|
||||
before/after** (0.153.0 / 0.156.0 / `104db0a4…`). **Deviation, ruled:** MinAgent moved
|
||||
0.92.1→0.93.0 at the save (spec said do-not-touch); flagged before deploy, ruled leave-as-is —
|
||||
transient held-floor window only, both boxes already ran controller ≥ floor.
|
||||
|
||||
## Deploys — felhom-pve first, then demo-hp
|
||||
|
||||
Channel per the 0.90 train: scp one hop → on-box sha256 verify (= `a68b2ff7…` both) →
|
||||
`.bak-0.92.1` → `install -m0755` → restart. demo-hp reached over the hub-vaulted G1 break-glass
|
||||
(no key baked; secret handled file→file via `SSH_ASKPASS`, shredded after, never printed).
|
||||
|
||||
Per-box clean-restart verification — **5/5 green on both** (journal times host-local CEST):
|
||||
|
||||
| Check | felhom-pve (restart 06:56:49Z) | demo-hp (restart 06:57:48Z) |
|
||||
|---|---|---|
|
||||
| active / no restart loop | ✅ active, NRestarts=0, clean startup `version=0.93.0` | ✅ same |
|
||||
| capabilities | ✅ 68/68 ok, degraded=0, inactive=0 | ✅ 68/68 ok, degraded=0, inactive=0 |
|
||||
| ReassertGuestBinds | ✅ only enrolled `uuid:47a3361a…` (`/mnt/hdd_1`→9201) | ✅ only enrolled `uuid:91d2dc2d…` (`/mnt/nvme-1tb`→9201) |
|
||||
| guestnet sweep | ✅ watchdog up; sweeps quiet, 0 ERROR/WARN since restart | ✅ same |
|
||||
| hub `agent_version` | ✅ 0.93.0 (report at startup, 06:56:52Z) | ✅ 0.93.0 (06:57:52Z) |
|
||||
|
||||
Escape hatch not needed; `.bak-0.92.1` retained on both boxes. `peti-felhom` deliberately not
|
||||
deployed to (down; gets 0.93.0 via Friday's reinstall + the vouched manifest — by design).
|
||||
|
||||
## Explicit statements (per the train spec)
|
||||
|
||||
- Controller floor and MinAgent handling: floor **byte-identical** before/after (0.156.0); golden
|
||||
entry byte-identical; MinAgent's 0.93.0 value is the one ruled deviation above.
|
||||
- No escrow ceremony was run as "verification" — the proof is the generation-path tests + version
|
||||
reporting, per the spec.
|
||||
- This train discharges `RUNBOOK-onboarding-draft-v4.md` §A item 5 (agent ≥ 0.93.0 box-side before
|
||||
the first real tester's escrow ceremony) — annotated there.
|
||||
|
||||
## Observations (recorded, not acted on)
|
||||
|
||||
- The spec's "ROADMAP wordlist row" does not exist in `felhom.eu/documentation/backlog/ROADMAP.md`;
|
||||
the gate discharge was annotated at its real home (onboarding runbook §A5) instead.
|
||||
- demo-hp's 1TB NVMe is now **enrolled** (reasserted into 9201) — TASK-H's "unenrolled/NTFS, do not
|
||||
touch" note is outdated.
|
||||
- demo-hp remains key-less; break-glass deploy worked cleanly. Tailnet key-expiry toggle still open.
|
||||
- CONTEXT.md's stale "agent DOWN at remote site / deployed 0.90.0" bullet superseded this train.
|
||||
## Observations
|
||||
- The earlier assumption that demo-felhom is "virtualized (no real SMART)" was WRONG — it is a real N100
|
||||
(SATA SSD `sda` + USB HDD `sdb`); the capability-map row is corrected accordingly.
|
||||
|
||||
Reference in New Issue
Block a user