An NVIDIA card with no driver is reported, not onboarded as a CPU node
CI / test (push) Failing after 9m12s

The agent found GPUs through nvidia-smi alone, so a machine whose driver
was never installed looked exactly like one with no card and joined
quietly as a CPU node. Only init looked at the PCI bus.

The host discovery now reads the bus too (vendor 0x10de, class 0x03) and
carries it to the control plane. The doctor fails the pre-install checks
on a card without a driver, with the install and the reboot named, and
tells a driver that is installed but not loaded (Secure Boot, nouveau)
apart from a missing one. A node already in shows the warning in ctl
nodes and the console. init uses the same check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Fable 5.1 committed 2026-11-19 12:29:02 +01:00
1 parent a53b2f4be9
commit c2fedeb326
12 files changed
+138 -26

No files matched your search

+1 -19
View File
@@ -329,7 +329,7 @@ func (in *serverInit) ensureNode(ctx context.Context) (string, error) {
if classes, n := gpuClasses(ctx); n > 0 {
in.kept("%d NVIDIA GPU(s) here: %s — the node will use them", n, strings.Join(classes, ", "))
} else if hasNVIDIADevice() {
} else if discovery.HasNVIDIADevice() {
fmt.Fprintf(in.out, " !! an NVIDIA card is on the PCI bus but nvidia-smi does not answer: "+
"install the driver and run init again to serve on it; until then this node is CPU only\n")
} else {
@@ -434,24 +434,6 @@ labels:
return nodeID, nil
}
// hasNVIDIADevice reports an NVIDIA card on the PCI bus, driver or not, so a
// machine whose GPU is invisible for want of a driver says so instead of
// quietly serving on CPU.
func hasNVIDIADevice() bool {
vendors, _ := filepath.Glob("/sys/bus/pci/devices/*/vendor")
for _, v := range vendors {
b, err := os.ReadFile(v)
if err == nil && strings.TrimSpace(string(b)) == "0x10de" {
class, _ := os.ReadFile(filepath.Join(filepath.Dir(v), "class"))
// 0x03xxxx is a display or 3D controller; NVIDIA also makes bridges.
if strings.HasPrefix(strings.TrimSpace(string(class)), "0x03") {
return true
}
}
}
return false
}
// --- the starter model ---
// starterModel is the catalog entry: a GPU profile first when there is a card,