From 6638d48d9fff10d64788cb67307098c0a3f512b3 Mon Sep 17 00:00:00 2001 From: Pramodh Vishwanath Date: Tue, 24 Nov 2026 06:07:42 -0700 Subject: [PATCH] fix(gpu): GPU Operator v26.7.3, no fixable Critical CVEs left GPU Operator v25.3.0 ships images with fixable Critical CVEs (2 to 13 per image), and container-toolkit v1.17.5 is built on end-of-life Ubuntu 20.04. With v26.7.3 no operator image has a Critical but the driver image, whose Criticals are all in linux-libc-dev: the kernel headers it builds the driver with. - GPU Operator v26.7.3: the values the role sets keep their meaning (helm template of both charts). The operands it adds (DRA driver, CC manager, Kata sandbox plugin) stay off without gpuCluster or sandbox workloads. Re-running install platform upgrades the release, and the chart's pre-upgrade hook applies three of its CRDs. It replaces each one whole, which drops its ownership labels, so the component now tears down with `both`: after the labelled objects go, the role's teardown deletes the three CRDs the hook replaces by name, gpuclusters (new in v26) too, and the two DRA CRDs a fresh v26 install creates, which ownership_enabled: false leaves to the role alone. A driver upgrade may now delete GPU pods with emptyDir volumes (gpuPodDeletion.deleteEmptyDir): model pods have them, and with the chart's default the node stays cordoned in upgrade-failed. - The role now waits until the operator validator DaemonSet runs the ClusterPolicy's validator version and is ready on every GPU node. The toolkit restarts containerd there when its old pod stops and again a few seconds after the new one is Ready, and the next platform component's exec on a GPU node failed on the dead socket, on a fresh install and on the v25.3.0 upgrade (seen on a B300). The validator's checks pass only after that restart. Best effort, like the bundled-NFD wait: after 10 minutes the install goes on. - The nvidia-smi validate pod uses cuda 12.9.2-base-ubuntu24.04: 6 fixable High instead of 18, no Critical in either. - dcgm-exporter 4.9 (v26.7.3) refuses raw bitmask fields and crash-looped on DCGM_FI_DEV_CLOCK_THROTTLE_REASONS (seen on a B300), so the CSV exports DCGM_EXP_CLOCK_EVENTS_COUNT instead. The GPUThrottling alert fires on its slowdown, thermal and power-brake events held for 10 minutes (the count is per 5-minute window), so idle GPUs and power-cap events at full load no longer fire it, and the dashboard panel shows those reasons plus power cap. The exporter labels series hostname since 4.8.3 (Hostname before), and the alerts and the dashboard follow; rack-scale.md says the dashboard shows no data from before the upgrade. The XID stat reads 0 until a GPU reports an XID, as 4.9 has no series before that. The CSV header named an Agent Toolkit playbook. - Docs: the versions, the host driver as the hardened option, what an upgrade does, and in adding-solutions.md that `both` and a role's teardown.yaml are also for objects that lose their labels. Jira: DCAIDSE8-2513 Signed-off-by: Pramodh Vishwanath --- configs/components.yaml | 16 +++-- docs/deployment/rack-scale.md | 9 ++- docs/reference/adding-solutions.md | 4 +- roles/gpu_observability/files/gpu-alerts.yaml | 26 ++++----- .../gpu_observability/files/nvidia-dcgm.json | 58 +++++++++---------- roles/nvidia_gpu_operator/defaults/main.yaml | 2 +- .../files/dcgm-metrics.csv | 20 ++++--- roles/nvidia_gpu_operator/tasks/install.yaml | 35 +++++++++++ roles/nvidia_gpu_operator/tasks/teardown.yaml | 3 +- roles/nvidia_gpu_operator/tasks/validate.yaml | 2 +- 10 files changed, 111 insertions(+), 64 deletions(-) diff --git a/configs/components.yaml b/configs/components.yaml index 3b170cf9..db4a4627 100644 --- a/configs/components.yaml +++ b/configs/components.yaml @@ -10,12 +10,13 @@ # Teardown deletes the objects the ownership role labelled during install # (roles/ownership). `teardown: role` runs the component's own teardown instead, and # `teardown: both` runs it after the labelled objects are gone: for components that -# also change hosts. `teardown_tasks` names the role's tasks file that takes back what -# the component changed in other components' objects (the gateway's portal and routes), -# run before the labelled objects go. `ownership_declared` lists objects the component -# creates that no task result names (a Job's, a subchart's CRDs), matched by any of kind, -# namespace, name and labels. `used_by` names the components a component exists for: it is -# installed only while one of them is enabled, and torn down with them. +# also change hosts, or whose objects lose their labels. `teardown_tasks` names the +# role's tasks file that takes back what the component changed in other components' +# objects (the gateway's portal and routes), run before the labelled objects go. +# `ownership_declared` lists objects the component creates that no task result names (a +# Job's, a subchart's CRDs), matched by any of kind, namespace, name and labels. `used_by` +# names the components a component exists for: it is installed only while one of them is +# enabled, and torn down with them. # # Adding a component here: add an entry and create roles//. # Adding a whole solution (its own layer, in its own repo): see @@ -119,8 +120,11 @@ components: # (infrastructure) has run before it. Planned (B2): detect vendors from NFD labels # and drop the rack_scale gate. Not on OpenShift for now: it expects the NFD Helm # release, and OpenShift gets NFD from its operator. + # teardown: both: the chart's pre-upgrade hook replaces its CRDs on every upgrade, + # which drops their ownership labels, so the role's teardown deletes them by name. - name: nvidia_gpu_operator layer: platform + teardown: both enabled: "{{ rack_scale_enabled | default(false) | bool and cluster_distribution | default('kubernetes') != 'openshift' }}" depends_on: [node_feature_discovery] diff --git a/docs/deployment/rack-scale.md b/docs/deployment/rack-scale.md index 3b08b210..bf3d5e4e 100644 --- a/docs/deployment/rack-scale.md +++ b/docs/deployment/rack-scale.md @@ -83,10 +83,14 @@ another cluster. See `lsblk` on each node right before deploying. - **Healthy package state:** no half-installed or failed packages, for example DKMS modules that do not build against the running kernel. -- **GPU nodes:** the GPU operator installs the NVIDIA driver +- **GPU nodes:** the GPU operator installs the NVIDIA driver in a container (`nvidia_gpu_operator_driver_enabled: true`) or uses a driver already installed on the host, which it detects. On HGX systems with a host driver, NVIDIA Fabric Manager must also be installed and running on the host. + The host driver with `nvidia_gpu_operator_driver_enabled: false` is the + hardened option: no driver container runs privileged on the GPU nodes with + the compiler and kernel headers it builds the driver with, and the driver + gets its fixes from the host's package updates. --- @@ -533,8 +537,9 @@ racks: **What happens automatically:** - Parser detects `accelerator:` → sets `rack_scale_gpu_vendor=nvidia` - `node_feature_discovery`, first in the platform layer, installs the cluster's one NFD (release `node-feature-discovery` in namespace `node-feature-discovery`). It does this on every cluster, rack-scale or not, with or without GPUs, and the inference layer's `nfd` component is left out of install, validate and teardown; `nfd_enabled: false` turns NFD off -- `nvidia_gpu_operator` role installs the NVIDIA GPU operator without the chart's bundled NFD (NVIDIA only; other vendors log a warning and get no stack from this role) +- `nvidia_gpu_operator` role installs the NVIDIA GPU operator v26.7.3 (driver 595.91.07) without the chart's bundled NFD (NVIDIA only; other vendors log a warning and get no stack from this role) - Both are platform components: `teardown inference` keeps them, `teardown platform` removes the GPU operator and NFD, and with NFD the node labels it set. On OpenShift the GPU operator and `gpu_observability` are not installed for now +- `install platform` from a newer release upgrades the GPU operator, and the chart's upgrade hook updates its ClusterPolicy, NVIDIADriver and GPUCluster CRDs. With the driver container (`nvidia_gpu_operator_driver_enabled: true`), the operator then replaces the driver one GPU node at a time, deleting the GPU pods on that node first; their controllers recreate them. The DCGM exporter of v26.7.3 labels its series `hostname` (`Hostname` before), so the GPU dashboard shows no data from before the upgrade. - Node labels applied: `gpu-vendor=nvidia`, `gpu-model=b300`, `gpu-form=hgx`, `gpu-count=8` (and `cpu-gen` / `cpu-sku` from `node_family` / `sku`) - These labels describe the hardware for you and your tools. GPU model pods are placed by their `nvidia.com/gpu` request, which the GPU operator makes the node advertise diff --git a/docs/reference/adding-solutions.md b/docs/reference/adding-solutions.md index 590f174b..8c58c50e 100644 --- a/docs/reference/adding-solutions.md +++ b/docs/reference/adding-solutions.md @@ -214,7 +214,7 @@ components: | `layer` | yes | Your layer, or an existing one you're extending. | | `depends_on` | yes (may be `[]`) | Component names. Only names **in the same layer** set the order; see below. | | `enabled` | no (default `true`) | `true`/`false`, or a Jinja expression rendering to one. | -| `teardown` | no (default `labels`) | `labels`: delete what install labelled (see [Ownership labels](#ownership-labels)). `role`: run the role's `teardown.yaml` instead. `both`: delete by label, then run `teardown.yaml`, for components that also change hosts. | +| `teardown` | no (default `labels`) | `labels`: delete what install labelled (see [Ownership labels](#ownership-labels)). `role`: run the role's `teardown.yaml` instead. `both`: delete by label, then run `teardown.yaml`, for components that also change hosts, or whose objects lose their labels. | | `teardown_tasks` | no | With `teardown: labels`, a tasks file of the role that runs before the labelled objects are deleted, to take back what the component changed in other components' objects (its portal entry and path on the gateway). The role needs `vars/.yaml`. | | `used_by` | no | Component names, any layer, for a component that exists only to serve them. It is installed only while one of them is enabled, and tearing them down takes it along, unless one outside that teardown is still enabled (preflight prints `Kept: …`). Names not in the registry are ignored. | @@ -302,7 +302,7 @@ roles// | File | Required | Contract | |---|---|---| | `tasks/install.yaml` | yes | Idempotent - a second run with no config change reports zero `changed`. | -| `tasks/teardown.yaml` | yes | Runs only with `teardown: role` or `both`. Removes what labels cannot: host changes, changes other than labels to objects that existed before. Succeeds when nothing is installed. | +| `tasks/teardown.yaml` | yes | Runs only with `teardown: role` or `both`. Removes what labels cannot: host changes, changes other than labels to objects that existed before, and objects that lose their labels (CRDs a chart hook replaces). Succeeds when nothing is installed. | | `tasks/validate.yaml` | yes | Read-only; never mutates the cluster. | | `vars/kubernetes.yaml`, `vars/openshift.yaml` | no | Both or neither, with the same keys. Literal values, named `__*`: `include_vars` keeps them for the rest of the play. A role without them has no `Load` step in its dispatcher. | | `defaults/main.yaml` | yes | Every variable the role reads, flat-named, with a working default. | diff --git a/roles/gpu_observability/files/gpu-alerts.yaml b/roles/gpu_observability/files/gpu-alerts.yaml index 81f21cfc..337e4e64 100644 --- a/roles/gpu_observability/files/gpu-alerts.yaml +++ b/roles/gpu_observability/files/gpu-alerts.yaml @@ -32,10 +32,10 @@ spec: labels: severity: warning annotations: - summary: "GPU {{ $labels.gpu }} on {{ $labels.Hostname }} has < 2 GiB memory free" + summary: "GPU {{ $labels.gpu }} on {{ $labels.hostname }} has < 2 GiB memory free" description: >- GPU {{ $labels.gpu }} ({{ $labels.modelName }}) on host - {{ $labels.Hostname }} has had {{ $value }} MiB of framebuffer + {{ $labels.hostname }} has had {{ $value }} MiB of framebuffer memory free for over 5 minutes. Serving pod: {{ $labels.namespace }}/{{ $labels.pod }}. @@ -47,10 +47,10 @@ spec: labels: severity: warning annotations: - summary: "GPU {{ $labels.gpu }} on {{ $labels.Hostname }} temp > 80C" + summary: "GPU {{ $labels.gpu }} on {{ $labels.hostname }} temp > 80C" description: >- GPU {{ $labels.gpu }} ({{ $labels.modelName }}) on host - {{ $labels.Hostname }} has run at {{ $value }}C (> 80C) for over + {{ $labels.hostname }} has run at {{ $value }}C (> 80C) for over 5 minutes and is likely thermally throttling. # Any double-bit ECC error is uncorrectable and indicates hardware @@ -61,23 +61,23 @@ spec: labels: severity: warning annotations: - summary: "GPU {{ $labels.gpu }} on {{ $labels.Hostname }} ECC double-bit error" + summary: "GPU {{ $labels.gpu }} on {{ $labels.hostname }} ECC double-bit error" description: >- GPU {{ $labels.gpu }} ({{ $labels.modelName }}) on host - {{ $labels.Hostname }} recorded new double-bit ECC errors in the last + {{ $labels.hostname }} recorded new double-bit ECC errors in the last 5 minutes. DBE errors are uncorrectable and indicate hardware degradation requiring investigation. - # Sustained non-zero throttle bitmask means clocks are being held below - # boost frequency, silently reducing inference throughput. + # The count is per 5-minute window, so 10 minutes means sustained throttling. + # Power-cap events are normal at full load: the dashboard shows them. - alert: GPUThrottling - expr: DCGM_FI_DEV_CLOCK_THROTTLE_REASONS > 0 - for: 5m + expr: DCGM_EXP_CLOCK_EVENTS_COUNT{clock_event=~"hw_slowdown|sw_thermal|hw_thermal|hw_power_brake"} > 0 + for: 10m labels: severity: warning annotations: - summary: "GPU {{ $labels.gpu }} on {{ $labels.Hostname }} is clock-throttling" + summary: "GPU {{ $labels.gpu }} on {{ $labels.hostname }} is clock-throttling" description: >- GPU {{ $labels.gpu }} ({{ $labels.modelName }}) on host - {{ $labels.Hostname }} has been clock-throttling (reasons bitmask: - {{ $value }}) for over 5 minutes, reducing inference throughput. + {{ $labels.hostname }} has been clock-throttling ({{ $labels.clock_event }}) + for over 10 minutes, reducing inference throughput. diff --git a/roles/gpu_observability/files/nvidia-dcgm.json b/roles/gpu_observability/files/nvidia-dcgm.json index 5d3032dd..552c237d 100644 --- a/roles/gpu_observability/files/nvidia-dcgm.json +++ b/roles/gpu_observability/files/nvidia-dcgm.json @@ -40,7 +40,7 @@ { "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "definition": "label_values(DCGM_FI_DEV_GPU_UTIL, Hostname)", + "definition": "label_values(DCGM_FI_DEV_GPU_UTIL, hostname)", "hide": 0, "includeAll": true, "label": "Host", @@ -48,7 +48,7 @@ "name": "Hostname", "options": [], "query": { - "query": "label_values(DCGM_FI_DEV_GPU_UTIL, Hostname)", + "query": "label_values(DCGM_FI_DEV_GPU_UTIL, hostname)", "refId": "StandardVariableQuery" }, "refresh": 2, @@ -59,7 +59,7 @@ { "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "definition": "label_values(DCGM_FI_DEV_GPU_UTIL{Hostname=~\"$Hostname\"}, gpu)", + "definition": "label_values(DCGM_FI_DEV_GPU_UTIL{hostname=~\"$Hostname\"}, gpu)", "hide": 0, "includeAll": true, "label": "GPU", @@ -67,7 +67,7 @@ "name": "gpu", "options": [], "query": { - "query": "label_values(DCGM_FI_DEV_GPU_UTIL{Hostname=~\"$Hostname\"}, gpu)", + "query": "label_values(DCGM_FI_DEV_GPU_UTIL{hostname=~\"$Hostname\"}, gpu)", "refId": "StandardVariableQuery" }, "refresh": 2, @@ -123,7 +123,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "count(DCGM_FI_DEV_GPU_UTIL{Hostname=~\"$Hostname\", gpu=~\"$gpu\"})", + "expr": "count(DCGM_FI_DEV_GPU_UTIL{hostname=~\"$Hostname\", gpu=~\"$gpu\"})", "legendFormat": "GPUs", "refId": "A" } @@ -167,7 +167,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "max(DCGM_FI_DEV_FB_USED{Hostname=~\"$Hostname\", gpu=~\"$gpu\"} / (DCGM_FI_DEV_FB_USED{Hostname=~\"$Hostname\", gpu=~\"$gpu\"} + DCGM_FI_DEV_FB_FREE{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}))", + "expr": "max(DCGM_FI_DEV_FB_USED{hostname=~\"$Hostname\", gpu=~\"$gpu\"} / (DCGM_FI_DEV_FB_USED{hostname=~\"$Hostname\", gpu=~\"$gpu\"} + DCGM_FI_DEV_FB_FREE{hostname=~\"$Hostname\", gpu=~\"$gpu\"}))", "legendFormat": "peak mem", "refId": "A" } @@ -209,7 +209,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "max(DCGM_FI_DEV_GPU_TEMP{Hostname=~\"$Hostname\", gpu=~\"$gpu\"})", + "expr": "max(DCGM_FI_DEV_GPU_TEMP{hostname=~\"$Hostname\", gpu=~\"$gpu\"})", "legendFormat": "max temp", "refId": "A" } @@ -247,7 +247,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum(DCGM_FI_DEV_POWER_USAGE{Hostname=~\"$Hostname\", gpu=~\"$gpu\"})", + "expr": "sum(DCGM_FI_DEV_POWER_USAGE{hostname=~\"$Hostname\", gpu=~\"$gpu\"})", "legendFormat": "total power", "refId": "A" } @@ -288,7 +288,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum(DCGM_FI_DEV_XID_ERRORS{Hostname=~\"$Hostname\", gpu=~\"$gpu\"})", + "expr": "sum(DCGM_FI_DEV_XID_ERRORS{hostname=~\"$Hostname\", gpu=~\"$gpu\"}) or vector(0)", "legendFormat": "XID errors", "refId": "A" } @@ -343,8 +343,8 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_GPU_UTIL{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", - "legendFormat": "{{Hostname}} gpu{{gpu}} ({{modelName}})", + "expr": "DCGM_FI_DEV_GPU_UTIL{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "legendFormat": "{{hostname}} gpu{{gpu}} ({{modelName}})", "refId": "A" } ], @@ -398,7 +398,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_FB_USED{Hostname=~\"$Hostname\", gpu=~\"$gpu\"} / (DCGM_FI_DEV_FB_USED{Hostname=~\"$Hostname\", gpu=~\"$gpu\"} + DCGM_FI_DEV_FB_FREE{Hostname=~\"$Hostname\", gpu=~\"$gpu\"})", + "expr": "DCGM_FI_DEV_FB_USED{hostname=~\"$Hostname\", gpu=~\"$gpu\"} / (DCGM_FI_DEV_FB_USED{hostname=~\"$Hostname\", gpu=~\"$gpu\"} + DCGM_FI_DEV_FB_FREE{hostname=~\"$Hostname\", gpu=~\"$gpu\"})", "legendFormat": "gpu{{gpu}} {{namespace}}/{{pod}}", "refId": "A" } @@ -444,14 +444,14 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_FB_USED{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_FB_USED{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} used", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_FB_FREE{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_FB_FREE{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} free", "refId": "B" } @@ -505,7 +505,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_GPU_TEMP{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_GPU_TEMP{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} ({{modelName}})", "refId": "A" } @@ -551,7 +551,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_POWER_USAGE{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_POWER_USAGE{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}}", "refId": "A" } @@ -597,21 +597,21 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_XID_ERRORS{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_XID_ERRORS{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} XID", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_CORRECTABLE_REMAPPED_ROWS{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_CORRECTABLE_REMAPPED_ROWS{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} remap (correctable)", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_UNCORRECTABLE_REMAPPED_ROWS{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_UNCORRECTABLE_REMAPPED_ROWS{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} remap (uncorrectable)", "refId": "C" } @@ -665,14 +665,14 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_ECC_SBE_VOL_TOTAL{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_ECC_SBE_VOL_TOTAL{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} SBE volatile", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_ECC_DBE_VOL_TOTAL{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_ECC_DBE_VOL_TOTAL{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} DBE volatile", "refId": "B" } @@ -718,14 +718,14 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_ECC_SBE_AGG_TOTAL{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_ECC_SBE_AGG_TOTAL{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} SBE aggregate", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_ECC_DBE_AGG_TOTAL{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_DEV_ECC_DBE_AGG_TOTAL{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} DBE aggregate", "refId": "B" } @@ -743,7 +743,7 @@ }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "Clock throttle reasons bitmask per GPU. Non-zero means the GPU is being held below boost frequency. Common bits: 0x2=SW thermal, 0x4=HW thermal, 0x8=power.", + "description": "Clock events per GPU in the exporter's 5-minute window, for the reasons that hold the GPU below boost frequency: power_cap, hw_slowdown, sw_thermal, hw_thermal and hw_power_brake.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, @@ -779,12 +779,12 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_DEV_CLOCK_THROTTLE_REASONS{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", - "legendFormat": "gpu{{gpu}} throttle reasons", + "expr": "DCGM_EXP_CLOCK_EVENTS_COUNT{hostname=~\"$Hostname\", gpu=~\"$gpu\", clock_event=~\"power_cap|hw_slowdown|sw_thermal|hw_thermal|hw_power_brake\"}", + "legendFormat": "gpu{{gpu}} {{clock_event}}", "refId": "A" } ], - "title": "Clock Throttle Reasons (bitmask)", + "title": "Clock events (last 5 min)", "type": "timeseries" }, { @@ -826,7 +826,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_PROF_SM_ACTIVE{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_PROF_SM_ACTIVE{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} SM active", "refId": "A" } @@ -873,7 +873,7 @@ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "DCGM_FI_PROF_SM_OCCUPANCY{Hostname=~\"$Hostname\", gpu=~\"$gpu\"}", + "expr": "DCGM_FI_PROF_SM_OCCUPANCY{hostname=~\"$Hostname\", gpu=~\"$gpu\"}", "legendFormat": "gpu{{gpu}} SM occupancy", "refId": "A" } diff --git a/roles/nvidia_gpu_operator/defaults/main.yaml b/roles/nvidia_gpu_operator/defaults/main.yaml index 7baa4932..8a265ab3 100644 --- a/roles/nvidia_gpu_operator/defaults/main.yaml +++ b/roles/nvidia_gpu_operator/defaults/main.yaml @@ -13,7 +13,7 @@ # --- NVIDIA GPU Operator --- nvidia_gpu_operator_namespace: "gpu-operator" -nvidia_gpu_operator_version: "v25.3.0" +nvidia_gpu_operator_version: "v26.7.3" nvidia_gpu_operator_helm_repo: "https://helm.ngc.nvidia.com/nvidia" nvidia_gpu_operator_helm_repo_name: "nvidia" nvidia_gpu_operator_chart: "nvidia/gpu-operator" diff --git a/roles/nvidia_gpu_operator/files/dcgm-metrics.csv b/roles/nvidia_gpu_operator/files/dcgm-metrics.csv index ae4458ae..9391f49b 100644 --- a/roles/nvidia_gpu_operator/files/dcgm-metrics.csv +++ b/roles/nvidia_gpu_operator/files/dcgm-metrics.csv @@ -8,15 +8,17 @@ # licensed under the Apache License, Version 2.0. # # This is the stock NVIDIA dcp-metrics-included.csv PLUS reliability and -# throughput-diagnostic fields the default set leaves out (ECC, clock-throttle -# reasons, thermal/power violation time, NVLink error counters, total -# framebuffer, and SM activity). All added fields are standard DCGM fields that -# this driver/B300 hardware reports (ECC verified Enabled via nvidia-smi). +# throughput-diagnostic fields the default set leaves out (ECC, clock +# events, thermal/power violation time, NVLink error counters, total +# framebuffer, and SM activity). The added fields are standard DCGM fields that +# this driver/B300 hardware reports (ECC verified Enabled via nvidia-smi), and +# DCGM_EXP_CLOCK_EVENTS_COUNT, which the exporter computes from DCGM's clock events. # -# Wired in by playbooks/deploy-nvidia-gpu-operator.yml via the GPU Operator's -# dcgmExporter.config ConfigMap, which mounts this file and points -# DCGM_EXPORTER_COLLECTORS at it. Editing this file + re-running that playbook -# (or the operator reconcile) rolls the exporter with the new set. +# Wired in by the nvidia_gpu_operator role (tasks/install.yaml) via the GPU +# Operator's dcgmExporter.config ConfigMap, which mounts this file and points +# DCGM_EXPORTER_COLLECTORS at it. After editing this file, re-run install +# platform to update the ConfigMap, then restart the nvidia-dcgm-exporter pods: +# the file is mounted with subPath, so running pods keep the old set. # # Format: DCGM_FIELD, prometheus_type, help string # ───────────────────────────────────────────────────────────────────────────── @@ -45,7 +47,7 @@ DCGM_FI_DEV_DEC_UTIL , gauge, Decoder utilization (in %). # ── Errors / reliability ───────────────────────────────────────────────────── DCGM_FI_DEV_XID_ERRORS, gauge, Value of the last XID error encountered. -DCGM_FI_DEV_CLOCK_THROTTLE_REASONS, gauge, Current clock throttle reasons (bitmask). +DCGM_EXP_CLOCK_EVENTS_COUNT, gauge, Clock events per reason in the exporter's time window. DCGM_FI_DEV_THERMAL_VIOLATION, counter, Throttling duration due to thermal constraints (in us). DCGM_FI_DEV_POWER_VIOLATION, counter, Throttling duration due to power constraints (in us). diff --git a/roles/nvidia_gpu_operator/tasks/install.yaml b/roles/nvidia_gpu_operator/tasks/install.yaml index 0868081e..97e1d672 100644 --- a/roles/nvidia_gpu_operator/tasks/install.yaml +++ b/roles/nvidia_gpu_operator/tasks/install.yaml @@ -105,6 +105,12 @@ values: driver: enabled: "{{ nvidia_gpu_operator_driver_enabled | bool }}" + # A driver upgrade deletes the GPU pods on each node first. Model pods have + # emptyDir volumes, which the chart's default refuses, and the node would + # then stay cordoned in upgrade-failed. + upgradePolicy: + gpuPodDeletion: + deleteEmptyDir: true toolkit: enabled: "{{ nvidia_gpu_operator_toolkit_enabled | bool }}" devicePlugin: @@ -141,6 +147,35 @@ ignore_errors: true when: nvidia_gpu_operator_nfd_enabled | bool + # The toolkit restarts containerd on each GPU node when its old pod stops and again a few + # seconds after the new one is Ready, which breaks the next components' execs there. The + # validator's checks pass only after that. Helm's wait covers only the operator, and the + # ClusterPolicy still says ready from before an upgrade. Best effort, like the NFD wait + # above; validate reports the operands. + - name: "nvidia_gpu_operator | nvidia | Read the validator version" + kubernetes.core.k8s_info: + api_version: nvidia.com/v1 + kind: ClusterPolicy + name: cluster-policy + register: _gpu_cluster_policy + + - name: "nvidia_gpu_operator | nvidia | Wait for that validator on every GPU node" + kubernetes.core.k8s_info: + api_version: apps/v1 + kind: DaemonSet + name: nvidia-operator-validator + namespace: "{{ nvidia_gpu_operator_namespace }}" + register: _gpu_validator_ds + until: + - _gpu_validator_ds.resources | default([]) | length > 0 + - _gpu_validator_ds.resources[0].spec.template.spec.containers[0].image.endswith(':' ~ _gpu_cluster_policy.resources[0].spec.validator.version) + - _gpu_validator_ds.resources[0].status.observedGeneration | default(0) == _gpu_validator_ds.resources[0].metadata.generation + - _gpu_validator_ds.resources[0].status.updatedNumberScheduled | default(0) == _gpu_validator_ds.resources[0].status.desiredNumberScheduled + - (_gpu_validator_ds.resources[0].status.numberReady | default(0)) == _gpu_validator_ds.resources[0].status.desiredNumberScheduled + retries: 60 + delay: 10 + ignore_errors: true + - name: "nvidia_gpu_operator | nvidia | Verify GPU Operator pods" kubernetes.core.k8s_info: kind: Pod diff --git a/roles/nvidia_gpu_operator/tasks/teardown.yaml b/roles/nvidia_gpu_operator/tasks/teardown.yaml index 2a042095..6c0c140a 100644 --- a/roles/nvidia_gpu_operator/tasks/teardown.yaml +++ b/roles/nvidia_gpu_operator/tasks/teardown.yaml @@ -45,7 +45,8 @@ name: "{{ item }}" state: absent loop: >- - {{ ['clusterpolicies.nvidia.com', 'nvidiadrivers.nvidia.com'] + {{ ['clusterpolicies.nvidia.com', 'nvidiadrivers.nvidia.com', 'gpuclusters.nvidia.com', + 'computedomains.resource.nvidia.com', 'computedomaincliques.resource.nvidia.com'] + (['nodefeatures.nfd.k8s-sigs.io', 'nodefeaturerules.nfd.k8s-sigs.io', 'nodefeaturegroups.nfd.k8s-sigs.io'] if nvidia_gpu_operator_nfd_enabled | bool else []) }} failed_when: false diff --git a/roles/nvidia_gpu_operator/tasks/validate.yaml b/roles/nvidia_gpu_operator/tasks/validate.yaml index 58fc07a1..79ecb5aa 100644 --- a/roles/nvidia_gpu_operator/tasks/validate.yaml +++ b/roles/nvidia_gpu_operator/tasks/validate.yaml @@ -167,7 +167,7 @@ restartPolicy: Never containers: - name: smi - image: nvidia/cuda:12.4.0-base-ubuntu22.04 + image: nvidia/cuda:12.9.2-base-ubuntu24.04 command: ["nvidia-smi"] resources: limits: