From 334354a10346555fc28530a2fec8e1a4224162d8 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 14 Jul 2026 16:27:59 +0100 Subject: [PATCH] =?UTF-8?q?docs(agent):=20file=20#118=20=E2=80=94=20smartd?= =?UTF-8?q?=20fails=20with=20no=20SMART=20device,=20reddening=20the=20heal?= =?UTF-8?q?th=20icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- agent/BACKLOG.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/agent/BACKLOG.md b/agent/BACKLOG.md index ce30ad2..3712006 100644 --- a/agent/BACKLOG.md +++ b/agent/BACKLOG.md @@ -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 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 **Progress 2026-07-13:** installed path VERIFIED at V1 — the exact HM