gpu-operator icon indicating copy to clipboard operation
gpu-operator copied to clipboard

NVIDIA GPU-Operator does not work on Openshift 4.3 or Openshift 4.4

Open relyt0925 opened this issue 6 years ago • 46 comments

There is a lot of existing documentation out there that points to the NVIDIA GPU Operator being GA. Documentation below: https://docs.nvidia.com/datacenter/kubernetes/openshift-on-gpu-install-guide/index.html https://devblogs.nvidia.com/nvidia-gpu-operator-simplifying-gpu-management-in-kubernetes/ https://www.openshift.com/blog/creating-a-gpu-enabled-node-with-openshift-4-2-in-amazon-ec2 https://access.redhat.com/solutions/4908611

However, none of these result in a functioning GPU system or deploy properly. Following the docs directly you end up not having the Node Feature Discovery Daemonset deployed and the GPU Operator errors with the following: Screen Shot 2020-05-29 at 11 19 25 PM

This was also on an Openshift 4.3 cluster and it ended up deploying the 4.4 version of the Node Feature Discovery Daemonset Screen Shot 2020-05-29 at 11 19 01 PM

Even when I fill out the CRD appropriately the gpu operator sits in crashloop state (was able to piece it together from the helm chart repo). The operator errors since the Node Feature Discovery daemonset doesn't get deployed.

If you manually deploy the Node Feature Discovery Daemonset, you end up getting glibc mismatch issues because the containers are built for Ubuntu 18.04's GLIBC version and not RHCOS or RHEL's GLIBC version. (noted in the openshift-psap comment here: https://github.com/openshift-psap/special-resource-operator/issues/22#issue-610308684)

I was able to get further deploying the PSAP operator (documented my journey with it here: https://github.com/openshift-psap/special-resource-operator/issues/22). However, I was told by the Openshift team that that operator will not be supported and that NVIDIA owns building the functionality that that operator provides in this repo.

I have tried to get support through multiple avenues (listed below): https://developer.nvidia.com/nvidia_bug/2997565 https://access.redhat.com/support/cases/#/case/02665306 https://github.com/NVIDIA/gpu-operator/issues/58 https://github.com/NVIDIA/gpu-operator/issues/32

But am not able to get support anywhere despite the fact that this is a GA offering. Am I missing the proper way to get support and open up issues to fix this offering on Openshift 4? Or am I looking at the wrong documentation?

Note other users are seeing this as well: https://github.com/NVIDIA/gpu-operator/issues/55 https://github.com/NVIDIA/gpu-operator/issues/48

relyt0925 avatar May 30 '20 04:05 relyt0925

cc @przem123 since I saw your issue had no comments as well.

relyt0925 avatar May 30 '20 04:05 relyt0925

I just have a few main questions: Is the documentation I provided above accurate and the offering is GA on openshift?

If it is GA: What is the support process for opening up issues with the offering? I suspect this offering does not work on any Openshift version or any operating system supported by Openshift after trying to follow the documentation present today.

relyt0925 avatar May 30 '20 04:05 relyt0925

cc @nvjmayo or @RenaudWasTaken as well in case this gets some eyes from the main contributors.

relyt0925 avatar May 30 '20 04:05 relyt0925

@relyt0925 I have installed and run the nvidia GPU operator on OpenShift 4.3. I focus mainly on clusters that are not connected to the internet. There are a few quirks to how the operator/helm chart are setup which require tuning in an air-gapped environment.

I have not tried to use the web console to deploy the operator and I'm not sure exactly what error you're running into but by default this operator won't work without some setup.

OpenShift 4 AWS IPI deploys all nodes as RHCOS. Nvidia built their driver images for RHCOS based on UBI images from RedHat. Nvidia all built the driver image such that it determines the kernel version of the RHCOS host at run time, dnf installs packages, and builds the nvidia kernel model. That dnf part can be a problem. Because the Nvidia gpu operator images are based on UBI images they do not have access to the standard RHEL repo stream. RHCOS also doesn't include these streams. To deploy on OpenShift you have to do one of 2 things:

  • Add RHEL entitlements into your OpenShift cluster that has all RHCOS nodes so the nvidia UBI driver image can dnf install packages
  • Add a RHEL node to your cluster, with a GPU, so that the driver is deployed on that host. The UBI image will inherit the entitlements from the underlying RHEL node.

If you are supporting disconnected environments I can send you some details on how to do that. I have a repo where I tossed what I did to build the driver image for disconnected environments. TL;DR you have to know the kernel version of the host the image will run on.

https://github.com/dmc5179/nvidia-driver

dmc5179 avatar Jun 12 '20 03:06 dmc5179

Hi, running into the exact same roadblocks mentioned by @relyt0925. No docs on ClusterPolicy, mismatched packages on Coreos, etc. Any movement on this?

afeiszli avatar Jun 12 '20 14:06 afeiszli

@afeiszli I was told that I need to have a NGC Ready Support Services contract in order to get support from NVIDIA in case that helps.

@dmc5179 awesome: I get that there's likely a way to hack it (I was able to get the openshift-psap operator running) however I'm more focused on clearing up discrepancies in the documentation.

  1. Is the offering GA from NVIDIA? Currently it says yes in the documentation so I would expect that exit criteria for that would be public documentation that can be followed.
  2. Can the documentation be updated to provide a clear process for users to get the GPU setup in an Openshift environment?

My main point is it seems that this offering is claimed to be GA but there's no clear documentation on how an end user would actually use it. Maybe that gets provided after a user gets the NGC Ready Support Services contract? That I need a NVIDIA representative to confirm on

I would not feel comfortable getting a contract unless I knew that there was a functioning solution available after I got that contract.

relyt0925 avatar Jun 12 '20 14:06 relyt0925

I was able to get all of it working now on ocp 4.4.6 with rhcos worker nodes. However, there are challenges to be addressed.

First finding; you must have entitlement set on your worker nodes before doing anything with the operator. Maybe including this in operator install docs as pre work would make it. more clear for everyone.

Second finding: I had previously installed this operator on different versions of it and different versions of openshift. It seems on the current version of the operator it fails because the crd is not updated properly. I got around this by deleting crd clusterpolicies.nvidia.com and then installing the gpu operator fresh.

Third finding: There is no doc to what an example spec for the CR should look like, and if you just apply the given template it fails looking for exporter spec. I found this and it worked for me:

apiVersion: nvidia.com/v1 kind: ClusterPolicy metadata: name: cluster-policy spec: dcgmExporter: image: dcgm-exporter repository: nvidia version: 1.7.2-2.0.0-rc.11-ubi8 devicePlugin: image: k8s-device-plugin repository: nvidia version: 1.0.0-beta6-ubi8 driver: image: driver repository: nvidia version: 440.64.00 operator: defaultRuntime: crio toolkit: image: container-toolkit repository: nvidia version: 1.0.2-ubi8 size: 4 https://examples.openshift.pub/gpu/on-aws/#instantiate-nvidia-gpu-operator

Last finding: my environment is proxy'd so i had to manually edit the daemonset for nvidia-driver-daemonset to include my proxy settings in the env vars. This would be great to be added in the CR spec for proxy setups.

Once the above was done, the pods came up clean and I could run the test nvida-smi pod: ` apiVersion: v1 kind: Pod metadata: name: nvidia-smi spec: containers:

  • image: nvidia/cuda name: nvidia-smi command: [ nvidia-smi ] resources: limits: nvidia.com/gpu: 1 requests: nvidia.com/gpu: 1 `

`+-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.64.00 Driver Version: 440.64.00 CUDA Version: 10.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Tesla V100-PCIE... On | 00000000:5E:00.0 Off | 0 | | N/A 31C P0 23W / 250W | 0MiB / 32510MiB | 1% Default | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+`

Hope this is useful :)

rspierz avatar Jun 12 '20 16:06 rspierz

@rspierz @relyt0925 Were you able to find how to modify the CRD for the OCP version? We are running 4.3 but the operator deploys for 4.4. Like you guys we struggle with no docs on how to configure the operator whatsoever. It does not seem to make sense for Nvidia to require a service contract just to get very basic documentation...

afeiszli avatar Jun 12 '20 16:06 afeiszli

@afeiszli I would upgrade to 4.4, 4.3 is already out of full support (June 5th).

rspierz avatar Jun 12 '20 16:06 rspierz

We cannot, due to other installs in our cluster which do not support 4.4 yet (require use of depreciated kube 1.16 apis).

afeiszli avatar Jun 12 '20 16:06 afeiszli

Thank you @rspierz for the updates. I would still like someone from NVIDIA to comment if what I'm saying is inaccurate or if there's the possibility to enhance the documentation to make this a clearer process.

I also appreciate the advice to upgrade however I would also like to know if that's NVIDIA's stance as well that they don't support old offerings once they go out of full support since Openshift maintains minor versions for years after the full support date.

I suspect as everyone has said there's ways to hack this to get this to work. That's not what I'm after. I'm after what NVIDIA recommends as the go to production code path for everyone using the operator and is that GA currently or not. It appears to me it's not since there's no clear documented path for users to get this applied.

relyt0925 avatar Jun 12 '20 19:06 relyt0925

@afeiszli I'll be sure to ping you when I figure it out and update this issue but I have not figured out the proper way yet.

relyt0925 avatar Jun 12 '20 19:06 relyt0925

@relyt0925 @rspierz Our issue turned out to be a lack of entitlements on the nodes, causing a "dnf install" command to fail. Reference here: https://access.redhat.com/solutions/4908771. After adding the entitlements the install went fine.

The Nvidia docs actually mention this under the "helm install" section but not under the operator section. If they mentioned this step in the operator section we would have been good to go.

afeiszli avatar Jun 23 '20 00:06 afeiszli

Just an update:

This still does not work as is documented in the Operator section of the documentation on Openshift 4.4. There's no documentation on what to put for the cluster policy CRD:

apiVersion: nvidia.com/v1
kind: ClusterPolicy
metadata:
  name: example
spec: {}

The default does not work.

In an Openshift 4.4 cluster when the Nvidia GPU Operator is installed it deploys the 4.2 version of the node feature discovery daemonset when it should deploy the 4.4 version

Screen Shot 2020-07-04 at 3 34 11 PM

relyt0925 avatar Jul 04 '20 20:07 relyt0925

I still haven't heard back from any NVIDIA representative on any of the issues I have opened up so far.

relyt0925 avatar Jul 04 '20 20:07 relyt0925

I got closer to getting an initial install completed

apiVersion: nvidia.com/v1
kind: ClusterPolicy
metadata:
  name: example
spec:
  dcgmExporter:
    image: dcgm-exporter
    repository: nvidia
    version: 1.7.2-2.0.0-rc.11-ubi8
  devicePlugin:
    image: k8s-device-plugin
    repository: nvidia
    version: v0.7.0-rc.1-ubi8
  driver:
    image: driver
    repository: registry.ng.bluemix.net/armada-master
    version: 440.33.01
  operator:
    defaultRuntime: crio
  toolkit:
    image: container-toolkit
    repository: nvidia
    version: 1.0.2-ubi8

However: there are still errors. There's an selinux issue that still occurs: https://github.com/NVIDIA/gpu-operator/issues/32

To work around: A user has to manually go into the container runtime container and execute the following command in order to fix the selinux context:

[root@nvidia-container-toolkit-daemonset-5c697 work]# chcon -t container_file_t /run/nvidia/driver/dev/nvidia*

Then restart the validation components. If the driver or toolkit container restarts this action needs to be performed again.

There's also changes to get the driver to work.

NVIDIA hasn't produced a driver container for RHEL 7.8 in their upstream repos (although if you duplicate the rhel7.7 build here: https://hub.docker.com/layers/nvidia/driver/440.33.01-rhel7.7/images/sha256-37641c899eb891cfd13d2b58647847e0aa02c89bbd16ac6df6a530f932162d32?context=explore

with

docker pull nvidia/driver/440.33.01-rhel7.7
docker tag  nvidia/driver/440.33.01-rhel7.7 registry.ng.bluemix.net/armada-master/driver:440.33.01-rhel7.8
docker push  registry.ng.bluemix.net/armada-master/driver:440.33.01-rhel7.8

You can get the driver container to successfully schedule.

relyt0925 avatar Jul 04 '20 21:07 relyt0925

It also appears that when scheduled the dcgm-exporter exporter container is not setup in Openshift to have metrics collected from it. I did verify that locally it is collecting metrics just that the wiring is not in place to get those metrics polled by prometheus in Openshift

[root@nvidia-dcgm-exporter-mdjm6 /]# curl localhost:9400/metrics
# HELP DCGM_FI_DEV_SM_CLOCK SM clock frequency (in MHz).
# TYPE DCGM_FI_DEV_SM_CLOCK gauge
# HELP DCGM_FI_DEV_MEM_CLOCK Memory clock frequency (in MHz).
# TYPE DCGM_FI_DEV_MEM_CLOCK gauge
# HELP DCGM_FI_DEV_MEMORY_TEMP Memory temperature (in C).
# TYPE DCGM_FI_DEV_MEMORY_TEMP gauge
# HELP DCGM_FI_DEV_GPU_TEMP GPU temperature (in C).
# TYPE DCGM_FI_DEV_GPU_TEMP gauge
# HELP DCGM_FI_DEV_POWER_USAGE Power draw (in W).
# TYPE DCGM_FI_DEV_POWER_USAGE gauge
# HELP DCGM_FI_DEV_TOTAL_ENERGY_CONSUMPTION Total energy consumption since boot (in mJ).
# TYPE DCGM_FI_DEV_TOTAL_ENERGY_CONSUMPTION counter
# HELP DCGM_FI_DEV_PCIE_TX_THROUGHPUT Total number of bytes transmitted through PCIe TX (in KB) via NVML.
# TYPE DCGM_FI_DEV_PCIE_TX_THROUGHPUT counter
# HELP DCGM_FI_DEV_PCIE_RX_THROUGHPUT Total number of bytes received through PCIe RX (in KB) via NVML.
# TYPE DCGM_FI_DEV_PCIE_RX_THROUGHPUT counter
# HELP DCGM_FI_DEV_PCIE_REPLAY_COUNTER Total number of PCIe retries.
# TYPE DCGM_FI_DEV_PCIE_REPLAY_COUNTER counter
# HELP DCGM_FI_DEV_GPU_UTIL GPU utilization (in %).
# TYPE DCGM_FI_DEV_GPU_UTIL gauge
# HELP DCGM_FI_DEV_MEM_COPY_UTIL Memory utilization (in %).
# TYPE DCGM_FI_DEV_MEM_COPY_UTIL gauge
# HELP DCGM_FI_DEV_ENC_UTIL Encoder utilization (in %).
# TYPE DCGM_FI_DEV_ENC_UTIL gauge
# HELP DCGM_FI_DEV_DEC_UTIL Decoder utilization (in %).
# TYPE DCGM_FI_DEV_DEC_UTIL gauge
# HELP DCGM_FI_DEV_XID_ERRORS Value of the last XID error encountered.
# TYPE DCGM_FI_DEV_XID_ERRORS gauge
# HELP DCGM_FI_DEV_POWER_VIOLATION Throttling duration due to power constraints (in us).
# TYPE DCGM_FI_DEV_POWER_VIOLATION counter
# HELP DCGM_FI_DEV_THERMAL_VIOLATION Throttling duration due to thermal constraints (in us).
# TYPE DCGM_FI_DEV_THERMAL_VIOLATION counter
# HELP DCGM_FI_DEV_SYNC_BOOST_VIOLATION Throttling duration due to sync-boost constraints (in us).
# TYPE DCGM_FI_DEV_SYNC_BOOST_VIOLATION counter
# HELP DCGM_FI_DEV_BOARD_LIMIT_VIOLATION Throttling duration due to board limit constraints (in us).
# TYPE DCGM_FI_DEV_BOARD_LIMIT_VIOLATION counter
# HELP DCGM_FI_DEV_LOW_UTIL_VIOLATION Throttling duration due to low utilization (in us).
# TYPE DCGM_FI_DEV_LOW_UTIL_VIOLATION counter
# HELP DCGM_FI_DEV_RELIABILITY_VIOLATION Throttling duration due to reliability constraints (in us).
# TYPE DCGM_FI_DEV_RELIABILITY_VIOLATION counter
# HELP DCGM_FI_DEV_FB_FREE Framebuffer memory free (in MiB).
# TYPE DCGM_FI_DEV_FB_FREE gauge
# HELP DCGM_FI_DEV_FB_USED Framebuffer memory used (in MiB).
# TYPE DCGM_FI_DEV_FB_USED gauge
# HELP DCGM_FI_DEV_ECC_SBE_VOL_TOTAL Total number of single-bit volatile ECC errors.
# TYPE DCGM_FI_DEV_ECC_SBE_VOL_TOTAL counter
# HELP DCGM_FI_DEV_ECC_DBE_VOL_TOTAL Total number of double-bit volatile ECC errors.
# TYPE DCGM_FI_DEV_ECC_DBE_VOL_TOTAL counter
# HELP DCGM_FI_DEV_ECC_SBE_AGG_TOTAL Total number of single-bit persistent ECC errors.
# TYPE DCGM_FI_DEV_ECC_SBE_AGG_TOTAL counter
# HELP DCGM_FI_DEV_ECC_DBE_AGG_TOTAL Total number of double-bit persistent ECC errors.
# TYPE DCGM_FI_DEV_ECC_DBE_AGG_TOTAL counter
# HELP DCGM_FI_DEV_RETIRED_SBE Total number of retired pages due to single-bit errors.
# TYPE DCGM_FI_DEV_RETIRED_SBE counter
# HELP DCGM_FI_DEV_RETIRED_DBE Total number of retired pages due to double-bit errors.
# TYPE DCGM_FI_DEV_RETIRED_DBE counter
# HELP DCGM_FI_DEV_RETIRED_PENDING Total number of pages pending retirement.
# TYPE DCGM_FI_DEV_RETIRED_PENDING counter
# HELP DCGM_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_TOTAL Total number of NVLink flow-control CRC errors.
# TYPE DCGM_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_TOTAL counter
# HELP DCGM_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_TOTAL Total number of NVLink data CRC errors.
# TYPE DCGM_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_TOTAL counter
# HELP DCGM_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_TOTAL Total number of NVLink retries.
# TYPE DCGM_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_TOTAL counter
# HELP DCGM_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_TOTAL Total number of NVLink recovery errors.
# TYPE DCGM_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_TOTAL counter
# HELP DCGM_FI_DEV_NVLINK_BANDWIDTH_TOTAL Total number of NVLink bandwidth counters for all lanes
# TYPE DCGM_FI_DEV_NVLINK_BANDWIDTH_TOTAL counter


DCGM_FI_DEV_SM_CLOCK{gpu="0", UUID="GPU-38f10a6d-7519-65ad-33f0-478fd429bd9b"} 324
DCGM_FI_DEV_MEM_CLOCK{gpu="0", UUID="GPU-38f10a6d-7519-65ad-33f0-478fd429bd9b"} 324
DCGM_FI_DEV_MEMORY_TEMP{gpu="0", UUID="GPU-38f10a6d-7519-65ad-33f0-478fd429bd9b"} 9223372036854775794
DCGM_FI_DEV_GPU_TEMP{gpu="0", UUID="GPU-38f10a6d-7519-65ad-33f0-478fd429bd9b"} 33
DCGM_FI_DEV_POWER_USAGE{gpu="0", UUID="GPU-38f10a6d-7519-65ad-33f0-478fd429bd9b"} 26.381000
DCGM_FI_DEV_TOTAL_ENERGY_CONSUMPTION{gpu="0", UUID="GPU-38f10a6d-7519-65ad-33f0-478fd429bd9b"} 9223372036854775794
DCGM_FI_DEV_PCIE_TX_THROUGHPUT{gpu="0", UUID="GPU-38f10a6d-7519-65ad-33f0-478fd429bd9b"} 9223372036854775794
DCGM_FI_DEV_PCIE_RX_THROUGHPUT{gpu="0", UUID="GPU-38f10a6d-7519-65ad-33f0-478fd429bd9b"} 9223372036854775794

relyt0925 avatar Jul 04 '20 21:07 relyt0925

Still need to hear from an NVIDIA representative on the proper way to get these fixes prioritized or the documentation updated to state explicitly what is supported and what a user needs in order to get support from NVIDIA for these components.

relyt0925 avatar Jul 04 '20 21:07 relyt0925

Having the exact same issue. Will try with a workaround from @relyt0925

deathemperor avatar Jul 10 '20 09:07 deathemperor

Having the exact same issue on OCP 4.4.8

ticlazau avatar Jul 10 '20 15:07 ticlazau