The command succeeds. The switch forwards for three weeks. Then a maintenance
reboot stops at grub>, the monitoring system reports "node down", and the only
useful evidence is on the partition that will not mount.

The chain

T+0 — the window opens. A change ticket covers an image upgrade across a
fabric. The pipeline reaches each switch in turn and runs:

nv action boot-next system image other

T+0.2s — the reader is inside the file. On one switch, prometheus-node-exporter
is midway through an inventory scrape. It has opened the boot configuration (or
invoked the collector that reads it) and is copying bytes into a metric.

T+0.4s — the writer rewrites it. The action truncates and rewrites the file,
or writes without an atomic replace. The reader's view and the writer's output
overlap. The resulting file is neither the old config nor the new one.

T+0.6s — the action returns success. The job completed. No parse check, no
hash check, no warning. The pipeline records the switch as upgraded.

T+0.7s — the fleet moves on. Two hundred more switches receive the same
command. Most win the race. The pipeline reports 200 successes.

T+21 days — the reboot. A maintenance window, a power event, a planned
reload. GRUB reads the file, hits a syntax error, and stops:

grub>

T+21 days + 2 minutes — the monitoring system reports the wrong thing.
The alert is node down or switch unreachable. It is technically true and
operationally useless: it points at power, optics, upstream links and hardware,
not at a text file written three weeks earlier.

T+21 days + 30 minutes — the diagnostic trap. Remote hands check power.
Optics are reseated. The upstream port is checked. The switch does not answer,
because it has not loaded a kernel. Every test that assumes an operating system
returns nothing, and "nothing" reads as dead hardware.

T+21 days + hours or days — the console. Someone attaches serial, sees
grub>, and the diagnosis collapses to a single file. If a console server was
already attached, this step took ten minutes.

The window is smaller than it looks

The race is not a long coincidence. A grub.cfg write is fast — milliseconds to
tens of milliseconds — and an inventory scrape that reads the same file is also
fast. The overlap is a narrow slice of wall-clock time.

That is exactly why the bug survives testing. A single manual upgrade almost
never hits it. A pipeline that runs the command against hundreds of switches,
each with a scrape interval measured in seconds, samples the window hundreds of
times. The probability per device is small; the number of attempts is large; the
expected number of dead switches per campaign is not zero.

The same arithmetic explains the reporting pattern: failures arrive in clusters,
during upgrade windows, and never during a lab reproduction.

Why the evidence is on the wrong side

The instinct after a failed boot is to collect logs. There are none:

  • No operating system. The switch never reached systemd, so there is no
    journal, no syslog and no agent.
  • The filesystem is not mounted. The corrupt grub.cfg is on the partition
    that will not boot. Reading it requires mounting that partition from a rescue
    environment — which is the console work you are already doing.
  • The action log is on the same disk. /var/log/nvued.log records the
    request id and the action state, on the partition that is offline.
  • The monitoring system lost the exporter at the same moment. The last
    scrape before the reboot may show a valid config; the metric is not designed
    to answer "does this file parse".

What survives is the console, the file itself, and whatever configuration
backup lives outside the switch. That is a thin evidence set for a
post-incident review, and it is the reason part 10 puts verification before
the reboot rather than after.

The second-order failures

A dead switch is not the end of the chain:

The rollback plan assumes a bootable switch. "Boot the other partition" is
the standard rollback, and it is exactly what the broken selector prevents. The
spare image is intact and unreachable.

The configuration backup may be on the device. If the last nv config save
went to local storage, it is on the partition that will not mount. Recovery then
depends on an external source of truth or a recent copy.

The maintenance window is now an incident. The rest of the campaign is
halted, usually after several switches have already received the command. The
question "which of the remaining switches have a corrupt config?" cannot be
answered by the automation that just ran.

The post-mortem looks for a culprit. The command succeeded, the operator
followed the runbook, and the vendor's note describes a race with a monitoring
agent. There is no change to blame, which makes the finding harder to action and
easier to file as "hardware".

The one control that breaks the chain

Every step after T+0.6s depends on nobody looking at the file. Insert a single
check between the command and the reboot:

grub-script-check /boot/grub/grub.cfg || echo "ABORT: grub.cfg does not parse"

The corruption still happens. The switch is still running. But the failure moves
from "three weeks later, at a console" to "now, on a device you can still fix",
which is the difference between a nuisance and an outage.

Next: Part 10 — the way out: quiesce, run, verify, reboot: the ladder and the
mitigation bundle.