docs(agent): file #118 — smartd fails with no SMART device, reddening the health icon
Some checks failed
Check / eval (push) Has been cancelled

Bernardo tested the live ISO and saw a smartd error on the Waybar doctor
module. Filed with the cause rather than the symptom: reproduced headlessly in
a scratch runNixOSTest whose node's only config is services.smartd.enable =
true — the same block default.nix:166 mkDefaults on for every machine.

  smartd: In the system's table of devices NO devices found to scan
  smartd: Unable to monitor any SMART enabled devices. Exiting.
  smartd.service: Main process exited, code=exited, status=17/n/a

Everything downstream is working correctly: systemctl --failed lists
smartd.service, so the doctor's generic failed-unit check reports it and
#custom-doctor goes @bad. The doctor is telling the truth — smartd is what
needs fixing.

Scope is wider than the live ISO, which is why it sits in NOW with the other
live findings rather than as a live-only nit: smartd mkDefaults true on
`nomarchy` too, and QEMU virtio disks expose no SMART, so a plain VM install
boots to a red health icon out of the box. Every V2 QEMU run has been showing
this.

The fix direction is the distro's own self-gate convention: `smartctl --scan`
prints nothing on such a machine, so an ExecCondition leaves the unit inactive
instead of failed and real SMART failures still surface. Recorded explicitly
that SuccessExitStatus = 17 is the wrong fix — it would also swallow smartd
dying on a machine that does have drives, which is the reason the daemon
exists.

V0: nix flake check --no-build passes. Backlog only — no fix attempted here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 16:27:59 +01:00
parent 0bb75b05a9
commit 334354a103

View File

@@ -30,6 +30,48 @@ These are separate queue items from one real install/session pass. Preserve
that separation when fixing them: the installer blocker, unclear installer that separation when fixing them: the installer blocker, unclear installer
copy, and post-install desktop failures have different verification paths. copy, and post-install desktop failures have different verification paths.
### 118. smartd fails where no drive has SMART, so the health icon greets you red
Bernardo, live ISO 2026-07-14: the Waybar doctor module shows a smartd error.
**Root cause, reproduced headlessly 2026-07-14** (scratch `runNixOSTest`, a
node whose only config is `services.smartd.enable = true` — the same block
`modules/nixos/default.nix:166` mkDefaults ON for every machine):
smartd[567]: In the system's table of devices NO devices found to scan
smartd[567]: Unable to monitor any SMART enabled devices. Exiting.
smartd.service: Main process exited, code=exited, status=17/n/a
Status: "No devices to monitor"
`smartctl --scan` prints **nothing** on such a machine — which is both the
cause and the ready-made gate. The rest of the chain is each part working
correctly: `systemctl --failed` lists `smartd.service`, so nomarchy-doctor's
generic failed-unit check (`nomarchy-doctor.sh:24-28`) reports "failed system
unit(s): smartd.service", and Waybar's `#custom-doctor` goes `@bad`. **Fix
smartd, not the doctor** — the doctor is telling the truth about a unit that
genuinely failed.
**Scope is wider than the live ISO** (which is why it's here and not filed as
a live-only nit): `services.smartd.enable` mkDefaults true on `nomarchy` as
well as `nomarchy-live`, and QEMU virtio disks expose no SMART — so a plain
VM install boots to a red health icon out of the box, as does a live USB whose
stick has no SMART. Every V2 QEMU run has been showing this.
Fix direction: **self-gate on the hardware**, the convention the rest of the
distro follows (`ExecCondition`, like the night-light; "each half self-gates
on its hardware"). A condition that runs `smartctl --scan` and skips the unit
when it finds nothing leaves the unit *inactive* rather than *failed*, so real
SMART failures on real drives still surface. Do **not** paper over it with
`SuccessExitStatus = 17` — that also swallows the case where smartd dies on a
machine that does have drives, which is the whole reason the daemon is here.
Pass = on a machine with no SMART-capable device the unit is inactive (not
failed), `systemctl --failed` is empty and the doctor is green; on a machine
with one, smartd runs as it does today; a permanent `checks.*` covers both
halves (the scratch repro above is most of it — the no-SMART node exists, the
with-SMART node needs a QEMU disk that answers SMART, or the gate script
tested directly against a stubbed `smartctl`).
### 94. Live ISO/install: no default browser observed ### 94. Live ISO/install: no default browser observed
**Progress 2026-07-13:** installed path VERIFIED at V1 — the exact HM **Progress 2026-07-13:** installed path VERIFIED at V1 — the exact HM