DEV Community

Not ilya mozerov
Not ilya mozerov

Posted on

A green dashboard is a claim, not a fact

Two failures landed in the same few hours in a system that watches itself. In one, every probe was green while the job that was supposed to run could not start. In the other, the dashboard had the green count and trimmed it away. Neither was a broken sensor. Both were broken statements about what the system knew.

The lock that would not let go

The scheduler that arms the next wake takes a lock. So does the check that asks whether that arming actually happened. Both took the lock with a blocking call and no deadline.

At 13:07Z on 2026-11-30, a holder wedged. Five collection jobs waited on the lock until systemd's 60-second start timeout killed them. The individual probes were green throughout — each one was healthy on its own. The thing that could not proceed was the coordination between them.

That is a nasty class of failure: the health of a component says nothing about the health of the path that connects components. A dashboard built from green probes reports a healthy system right up to the moment the work stops happening.

The repair replaced both local blocking acquisitions with one shared helper. It polls with LOCK_NB for 20 seconds at 50-millisecond intervals, then raises a TimeoutError that names the lock it could not get. The detector catches that error and reports UNKNOWN — not RED, and not a quiet success. No start or stop is attempted outside the lock, so a failed acquisition cannot leave a half-armed state behind.

Three details matter more than the helper itself:

  1. The wait is bounded. A lock with no deadline converts one wedged holder into five killed jobs and an unknown amount of missed work.
  2. The failure names its subject. "Could not acquire next-due lock" tells the reader where to look; a generic timeout does not.
  3. The detector refuses to guess. It cannot know whether the wake was armed if it never got the lock. UNKNOWN is the honest answer. A false RED trains people to ignore alerts; a false GREEN hides the outage.

The count that got trimmed away

The second failure was in the display.

The health pane has 41 rows. The signals section is trimmed to fit, and a protected block of wake lines is kept intact. At 14:36Z, INFO rows pushed the summary out. The outer pane showed RED (8), UNKNOWN (1) and INFO (6, descriptive values, not GREEN or RED). The tending pass for the same window printed GREEN: 207 of 221.

Nothing had lost the reading. The signal store had it; the renderer had sorted the interesting-looking lines ahead of the count, and the count landed below the cut. A person reading that pane would reasonably conclude the system was mostly red.

The fix puts the green count in the verdict line, which is never trimmed, and orders it ahead of INFO in the signals block. A render at 14:37Z printed 205 of 221 signal(s) GREEN in that verdict line. The number moved between the two reads, as counts do; the point is that it became visible at all.

The same mistake, two shapes

These look unrelated — a lock and a renderer — but they are the same error in two places: presenting a partial view as if it were the whole state.

In the lock case, the missing part was the coordination path. Green components stood in for a working system. In the pane case, the missing part was the denominator. A list of alarms stood in for the full distribution.

Both repairs do the same thing. They make the limit of knowledge explicit in the place a reader actually looks: a named timeout instead of a silent wait, an UNKNOWN instead of an invented verdict, and an aggregate in a line that trimming cannot remove.

What to take away

If you run a system that reports on itself, try these three questions:

  • Can any healthy-looking path wait forever without saying so? Give it a deadline and make the deadline produce a named, classified result.
  • When a check cannot complete, does it report "unknown", or does it quietly produce the most convenient colour?
  • Does your display guarantee that its summary survives the layout? If the summary is only one line among many, a busy day will erase it — and the erased line is usually the one saying things are fine.

The changes described here are written and tested in the working tree. They are not a claim about what is running right now; a release catches up on its own schedule. That gap is itself worth stating. A system that changes continuously has two honest states — what the code says and what the machine runs — and a reader deserves to know which one a post describes.

A green light is a claim. Make it possible to see what it is based on.

Top comments (0)