Repository navigation
Description
Motivation
I ran into this on a real cluster. I want one GPU Operator to run two vGPU host driver flavours on different node groups, which is what driver.useNvidiaDriverCRD: true with one NVIDIADriver of driverType: vgpu-host-manager per node group is for. On OpenShift the vGPU Manager installs and loads, but nothing after it starts.
- I would like to work on this issue.
Describe the bug
With an NVIDIADriver of driverType: vgpu-host-manager on OpenShift (Driver Toolkit in use), the vGPU Manager is built, installed and loaded, but the driver root never appears at /run/nvidia/driver on the host. The vgpu-manager-validation init container of nvidia-sandbox-validator fails forever, and nvidia-vgpu-device-manager and nvidia-sandbox-device-plugin stay in Init:
chroot: can't execute 'nvidia-smi': No such file or directory
time="..." level=warning msg="error running command: exit status 127"
command failed, retrying after 5 seconds
What the node looks like at that point:
- The driver pod is
2/2 Runningand theNVIDIADriverobject isready. TheClusterPolicystaysnotReady. - The
openshift-driver-toolkit-ctrlog showsKernel module compilation complete,Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 595.71.03) is now complete,modprobe nvidia,modprobe nvidia_vgpu_vfioandDone, now waiting for signal. nvidia-smiinsideopenshift-driver-toolkit-ctrlists all 4 GPUs.- Inside
openshift-driver-toolkit-ctr,/proc/self/mountinfohas the container root mounted at/run/nvidia/driver. - Inside
nvidia-driver-ctr, which has the host's/run/nvidia,/run/nvidia/drivercontains onlylib(thenv-firmwarehostPath) and nothing is mounted there.
Cause, as far as I can tell from the source:
- In the vGPU Manager image,
ocp_dtk_entrypoint dtk-build-driverruns the wholenvidia-driver initinsideopenshift-driver-toolkit-ctr(NVIDIA/gpu-driver-container,vgpu-manager/rhel9/ocp_dtk_entrypoint: "TODO: only build driver in the dtk, and let main container load.").nvidia-driver initends with_mount_rootfs, which doesmount --rbind / /run/nvidia/driverin that container.nvidia-driver-ctronly prepares the shared directory and then runssleep infinity. - The ClusterPolicy path accounts for this.
assets/state-vgpu-manager/0500_daemonset.yamlmountsrun-nvidiaat/run/nvidiawithmountPropagation: Bidirectionalinto the side-car, with the comment "Currently, the OCP DriverToolkit side-car loads the driver and mounts the driver rootfs, so the /run/nvidia volume is needed". - The NVIDIADriver path does not. In
manifests/state-driver/0500_daemonset.yaml,openshift-driver-toolkit-ctrmountsshared-nvidia-driver-toolkit,var-log,mlnx-ofed-usr-src,host-os-release,firmware-search-pathandnv-firmware, but notrun-nvidia. Onlynvidia-driver-ctrhas/run/nvidia.
So the rbind lands on a path that is private to the side-car and never reaches the host. The side-car's mounts are the same on main (checked at 877c986) and in v26.7.3.
I searched issues and pull requests for this and found no report. #3111 and #3162 touch nearby code but neither changes manifests/state-driver/0500_daemonset.yaml.
To Reproduce
-
OpenShift cluster with the Driver Toolkit image stream, GPU Operator v26.7.3, a node with vGPU-capable GPUs labelled
nvidia.com/gpu.workload.config=vm-vgpu. -
A
ClusterPolicytaken from the CSV's example, withsandboxWorkloads.enabled: trueanddriver.useNvidiaDriverCRD: true. -
An
NVIDIADriverfor that node. The image is built fromvgpu-manager/rhel9of NVIDIA/gpu-driver-container at 24e26a1, scripts unmodified:apiVersion: nvidia.com/v1alpha1 kind: NVIDIADriver metadata: name: vgpu-host spec: driverType: vgpu-host-manager repository: <private registry> image: <vgpu manager image> version: "<version>" nodeSelector: <node group label>: "<value>"
-
Wait for the driver pod to be
2/2 Running, then readoc -n nvidia-gpu-operator logs <nvidia-sandbox-validator pod> -c vgpu-manager-validation.
Expected behavior
The driver root is visible on the host at /run/nvidia/driver, vgpu-manager-validation passes, and the vGPU Device Manager and the sandbox device plugin start, as they do with the vGPU Manager DaemonSet that ClusterPolicy deploys.
Proposed fix: mount run-nvidia with Bidirectional propagation into openshift-driver-toolkit-ctr in manifests/state-driver/0500_daemonset.yaml when driverType is vgpu-host-manager, as assets/state-vgpu-manager/0500_daemonset.yaml does, and update the golden file of TestVGPUHostManagerDaemonsetOpenShift. I have this change ready and can open a pull request once the issue is accepted.
Environment (please provide the following information):
- GPU Operator Version: v26.7.3 (certified operator bundle, channel v26.7)
- OS: Red Hat Enterprise Linux CoreOS 9.8 (OpenShift 4.22.6)
- Kernel Version: 5.14.0-687.26.1.el9_8.x86_64
- Container Runtime Version: CRI-O 1.35.5
- Kubernetes Distro and Version: OpenShift 4.22.6 (Kubernetes v1.35.5)
- GPUs: 4 x NVIDIA RTX PRO 6000 Blackwell Server Edition per node; vGPU host driver 595.71.03
Information to attach (optional if deemed irrelevant)
Pods on one GPU node:
nvidia-sandbox-device-plugin-daemonset-v9lvb 0/1 Init:1/2
nvidia-sandbox-validator-7m8xd 0/1 Init:2/4
nvidia-vgpu-device-manager-r4lnh 0/1 Init:0/1
nvidia-vgpu-host-manager-driver-rhel9-66985d499f-7ftf6 2/2 Running
Init containers of the validator:
cc-manager-validation=true vfio-pci-validation=true vgpu-manager-validation=false vgpu-devices-validation=false
Volume mounts of the driver pod as created by the operator (service account token omitted):
nvidia-driver-ctr | ocp_dtk_entrypoint nv-ctr-run-with-dtk
run-nvidia /run/nvidia Bidirectional
run-nvidia-fabricmanager /run/nvidia-fabricmanager
run-nvidia-topologyd /run/nvidia-topologyd
var-log /var/log
dev-log /dev/log
host-os-release /host-etc/os-release
cgroup /sys/fs/cgroup
vfio /dev/vfio
mlnx-ofed-usr-src /run/mellanox/drivers/usr/src HostToContainer
run-mellanox-drivers /run/mellanox/drivers HostToContainer
firmware-search-path /sys/module/firmware_class/parameters/path
host-sys-devices-system /sys/devices/system
nv-firmware /lib/firmware
driver-startup-probe-script /usr/local/bin/startup-probe.sh
shared-nvidia-driver-toolkit /mnt/shared-nvidia-driver-toolkit
gpu-operator-trusted-ca /etc/pki/ca-trust/extracted/pem
openshift-driver-toolkit-ctr | bash -xc until [ -f /mnt/shared-nvidia-driver-toolkit/dir_prepared ]; ...
shared-nvidia-driver-toolkit /mnt/shared-nvidia-driver-toolkit
var-log /var/log
mlnx-ofed-usr-src /run/mellanox/drivers/usr/src HostToContainer
host-os-release /host-etc/os-release
firmware-search-path /sys/module/firmware_class/parameters/path
nv-firmware /lib/firmware
Unrelated to this report: on these nodes the side-car log also shows sriov-manage failing to enable the virtual functions (write error: Cannot allocate memory), which is a firmware address-space setting on the servers. The validator fails before anything needs the virtual functions.
Activity