wrolpi/controller/lib
lrnselfreliance dac849f9f6
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Controller Tests / controller-tests (push) Has been cancelled
Jest Tests / jest-tests (push) Has been cancelled
Surface coarse SMART health for USB-bridge drives (#498)
* Surface coarse SMART health for USB-bridge drives

USB enclosures that reject ATA pass-through (e.g. Seagate Expansion) are
invisible to pySMART/DeviceList, so the drive shows no SMART at all on the
Controller page. Fall back to smartctl over the SCSI transport, which many
such bridges still answer, to report a coarse PASS/FAIL health plus drive
identity (model/serial/capacity).

The health (-d scsi -H) and identity (-d scsi -i) reads are issued as
separate calls: combining them makes smartctl suppress the health line when
the identity read reports "SMART support is: Unavailable" (which these
bridges do). The entry is marked smart_limited (labelled "(limited)" in both
UIs) so a green PASS is not mistaken for full monitoring — these drives
expose no attributes or temperature, and some bridges report "OK" statically.

* Harden SCSI health fallback (Greptile review)

- _scsi_health: treat any unrecognised status (e.g. "UNKNOWN", "N/A") as
  unreadable (None) instead of a false FAIL. Only "OK" -> PASS and "FAIL*"
  -> FAIL; anything else omits the drive rather than showing a red FAIL that
  contradicts the smart_limited disclaimer.
- get_all_smart_status: isolate the SCSI supplement loop in its own
  try/except so an error there cannot discard the pySMART results already
  collected.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 09:05:06 -06:00
..
__init__.py Creating Controller service which will control WROLPi services, admin, SMART, disks, and status. nginx will fallback to Controller UI when React UI is unavailable (such as during upgrades). 2025-12-15 15:48:40 -07:00
admin.py Key changes: 2026-04-04 13:48:19 -06:00
config.py Add controller onboarding flow for primary drive setup 2026-03-14 16:08:40 -06:00
disks.py Adding support for mounting NTFS drives in the Controller. (#440) 2026-05-15 19:25:43 -06:00
docker_services.py Adding docker support for samba shares. 2026-03-29 11:14:38 -06:00
fstab.py Controller logs when it takes actions. 2026-03-14 10:03:11 -06:00
fstab_migration.py Moving WROLPi-managed mounts off /etc/fstab onto a drive-resident fstab.yaml. 2026-05-24 12:44:05 -06:00
fstab_yaml.py Moving WROLPi-managed mounts off /etc/fstab onto a drive-resident fstab.yaml. 2026-05-24 12:44:05 -06:00
mount_executor.py Moving WROLPi-managed mounts off /etc/fstab onto a drive-resident fstab.yaml. 2026-05-24 12:44:05 -06:00
mount_runner.py Moving WROLPi-managed mounts off /etc/fstab onto a drive-resident fstab.yaml. 2026-05-24 12:44:05 -06:00
onboarding.py Moving WROLPi-managed mounts off /etc/fstab onto a drive-resident fstab.yaml. 2026-05-24 12:44:05 -06:00
readiness.py Checking readiness of main app in Controller instead of javascript requests, which break with CORS. 2026-03-08 16:05:56 -06:00
reconciler.py Moving WROLPi-managed mounts off /etc/fstab onto a drive-resident fstab.yaml. 2026-05-24 12:44:05 -06:00
samba.py Adding docker support for samba shares. 2026-03-29 11:14:38 -06:00
scripts.py Controller logs when it takes actions. 2026-03-14 10:03:11 -06:00
smart.py Surface coarse SMART health for USB-bridge drives (#498) 2026-06-26 09:05:06 -06:00
status.py Fetching processes from PROCFS_PATH in docker container. 2026-05-30 15:59:14 -06:00
status_worker.py Warn in the navbar when a hard drive runs hot (#470) 2026-06-11 19:46:33 -06:00
systemd.py Controller logs when it takes actions. 2026-03-14 10:03:11 -06:00
wrol_mode.py Creating Controller service which will control WROLPi services, admin, SMART, disks, and status. nginx will fallback to Controller UI when React UI is unavailable (such as during upgrades). 2025-12-15 15:48:40 -07:00