…ic (#2840)
* feat(al2023/nvidia): only start fabric manager on hosts with an NVSwitch fabric
nvidia-fabricmanager is enabled on every NVIDIA instance, but it only has
work to do on hosts that manage NVSwitches. Elsewhere, single-GPU and
PCIe-only instances and GB200/GB300 whose fabric is managed off-host by
the rack's switch trays, it exits with NV_WARN_NOTHING_TO_DO and leaves a
failed unit behind, which reads like a broken GPU interconnect.
Gate the unit with an ExecCondition drop-in. The condition starts Fabric
Manager when it finds NVSwitches on the PCI bus (class 0680, how the
nvidia driver binds them on HGX A100/H100/H200) or a ConnectX bridge with
SW_MNG in its VPD (NVLink5+, the same check nvidia-fabricmanager-start.sh
uses), and skips it on known off-host-fabric GPUs and everywhere else. A
skipped unit shows as inactive with a condition message instead of failed.
systemd skips on any condition exit from 1 to 254, so the condition fails
open: it starts Fabric Manager whenever lspci can't be read, and returns 1
only from an explicit decision. validate.sh exercises every decision path
against canned lspci output so a broken condition fails the AMI build.
Closes #2727
* docs(al2023/nvidia): cite sources for fabricmanager condition IDs
Say where each hex constant comes from: the PCI vendor and class IDs from
pci.ids, class 0x0680 from the nvidia driver's own NVSwitch PCI table, and
the GB200/GB300 device IDs from NVIDIA's supported-gpus lists. Explain the
lspci -mm fields and the awk match idiom with example lines.
In validate.sh, mark which lspci fixtures were captured from real
instances and which are hand-written. Replace the NVSwitch fixture with
the line captured from a p4d.24xlarge; only its subdevice ID changes,
which the condition doesn't read.
* docs(al2023/nvidia): explain why the fabricmanager condition fails open
Wrongly starting Fabric Manager costs one failed unit, the behavior before
the condition existed. Wrongly skipping it on an NVSwitch host leaves the
fabric unconfigured, which per NVIDIA's Fabric Manager user guide fails
CUDA initialization on HGX A100 and costs NVLink peer-to-peer on HGX H100
and later.
* fix(nvidia): detect NVSwitches via the driver, drop the GB device-ID skip
Address review feedback:
- Start Fabric Manager when the nvidia driver has registered an NVSwitch
under /proc/driver/nvidia-nvswitch/devices, the same check NVIDIA's
gpu-driver-container uses. The lspci class 0680 check stays alongside it
so starting doesn't depend on the driver having loaded first.
- Remove the GB200/GB300 device-ID skip. Off-host NVSwitches aren't visible
to the guest, so those hosts already fall through to skip, and FM ships
topologies for GB200 systems with a local fabric, where a device-ID skip
would be a false negative.
- validate.sh: check that every tree carries nvidia-fabricmanager.service,
the exact name the drop-in directory applies to, and cover the procfs
check in the condition cases.