acs-engine icon indicating copy to clipboard operation
acs-engine copied to clipboard

Capacity "alpha.kubernetes.io/nvidia-gpu" changed to 0 after stop/start N series VM

Open wenwu449 opened this issue 8 years ago • 9 comments

Is this a request for help?: No

Is this an ISSUE or FEATURE REQUEST? (choose one): Issue

What version of acs-engine?: v0.16.2

Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm) Kubernetes

What happened: "alpha.kubernetes.io/nvidia-gpu" of N series VM in "Capacity" and "Allocatable" of agent node changed to 0 after stop/start VM

What you expected to happen: "alpha.kubernetes.io/nvidia-gpu"of N series VM in "Capacity" and "Allocatable" of agent node be 1 after stop/start VM.

How to reproduce it (as minimally and precisely as possible): use acs-engine deploy with this api-model(https://github.com/Azure/acs-engine/blob/v0.16.2/examples/e2e-tests/kubernetes/gpu-enabled/definition.json), wait until agent node show "alpha.kubernetes.io/nvidia-gpu" as 1, stop(deallocate) the VM via Azure portal, wait for an hour, start the VM. when the node turns "ready", check the "alpha.kubernetes.io/nvidia-gpu" of the agent node, it is 0.

Anything else we need to know: No

wenwu449 avatar May 15 '18 00:05 wenwu449

Thanks for reporting this.

Looks like /dev/nvidia-uvm is not present after a node is rebooted. Workaround is to call nvidia-modprobe -u -c0 and restarting kubelet in each node after they are rebooted. Looking into this.

sozercan avatar May 24 '18 20:05 sozercan

#2545 addresses this when running k8s 1.10 and above

sozercan avatar May 30 '18 20:05 sozercan

Hey guys, any workaround for this for k8s 1.8.7? I tried running a daemonset which did called nvidia-modprobe -u -c0, but that does nothing and just exits silently. ACS engine version we are using is: v0.15.2

vangarp avatar Aug 01 '18 16:08 vangarp

@wbuchwalter @sozercan can you confirm there is no known fix for this with < 1.10 clusters at this time?

jackfrancis avatar Aug 02 '18 23:08 jackfrancis

The current mitigation is to add the module and restart kubelet.

sudo su
cd /usr/local/nvidia
sh $(ls nvidia-drivers-*) --silent --accept-license --no-drm --utility-prefix="/usr/local/nvidia/" --opengl-prefix="/usr/local/nvidia"
nvidia-modprobe -u -c0
/usr/local/nvidia/bin/nvidia-smi
systemctl daemon-reload
systemctl restart kubelet

lachie83 avatar Aug 15 '18 00:08 lachie83

Thanks will give it a try!

vangarp avatar Aug 15 '18 00:08 vangarp

I can confirm that the fix suggested by @lachie83 works for kubernetes 1.8.7. Thanks for that.

vangarp avatar Aug 15 '18 16:08 vangarp

Fix - https://github.com/Azure/acs-engine/pull/3688

lachie83 avatar Aug 17 '18 21:08 lachie83

Thanks again @lachie83!

jackfrancis avatar Aug 17 '18 21:08 jackfrancis