Commit Graph

10 Commits

Author SHA1 Message Date
0f829e0380 Split into dedicated hardware poller + read-only consumers
Rearchitect so a single poller process is the sole owner of all SAS/SMART/
SES hardware I/O, serialized behind one gate and paced, writing results to
Redis. The API/web and MQTT publisher become pure Redis readers — they no
longer issue any subprocess and can restart freely without touching the bus.

This addresses backplane/expander stress from concurrent + restart-triggered
SMART/SES storms (the prior model re-ran a hardware sweep on every container
start, and polled sg_ses 0x02+0x07 every 60s; 0x07 errored on the IOM6/
Xyratex expanders).

- poller.py: paced sweep (inventory, SMART per-drive w/ gap, SES 0x02, ZFS,
  host/MegaRAID), startup jitter, single-instance Redis lock, LED-queue worker
- services/hwgate.py: global serialization semaphore (POLL_CONCURRENCY=1)
- services/store.py: Redis as the only producer<->consumer interface + LED queue
- services/health.py: shared drive-health classifier (fixes overview double-count)
- gate smartctl/sg_ses/zpool/ledctl; drop sg_ses 0x07 from the hot path
- routers + temps read-only from the store; main.py drops the in-process poller
- compose: 3 services (privileged poller + unprivileged app + redis) w/ pacing knobs
2026-06-16 15:12:34 +00:00
b11c1bdf98 Replace in-memory TTL cache with Redis 2026-03-07 18:45:15 +00:00
a25ce4ae21 Add ZFS drive state (ONLINE/FAULTED/DEGRADED) to UI 2026-03-07 04:44:31 +00:00
cea4db53fd Resolve multipath dm devices to underlying sd devices for ZFS pool map 2026-03-07 04:34:44 +00:00
3280d66888 Fix vdev parsing: use leading whitespace count instead of tab count 2026-03-07 04:20:42 +00:00
3ef7061aa5 Add ZFS vdev exposure in API and frontend 2026-03-07 04:14:14 +00:00
10de5563b2 Use nsenter with pid:host to run zpool in host mount namespace 2026-03-07 04:04:15 +00:00
034219c75e Set LD_LIBRARY_PATH only for zpool subprocess, not globally 2026-03-07 03:48:46 +00:00
4c033981c1 Fix ZFS pool detection: bind-mount host zpool binary and libs 2026-03-07 03:46:56 +00:00
7beead8cae Add React frontend, ZFS pool mapping, and multi-stage Docker build
- Vite + React frontend with dark-themed dashboard, slot grid per
  enclosure, and SMART detail overlay
- ZFS pool membership via zpool status -P
- Multi-stage Dockerfile (Node build + Python runtime)
- Updated docker-compose with network_mode host and healthcheck
2026-03-07 03:04:23 +00:00