Capacity "alpha.kubernetes.io/nvidia-gpu" changed to 0 after stop/start N series VM
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
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.
#2545 addresses this when running k8s 1.10 and above
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
@wbuchwalter @sozercan can you confirm there is no known fix for this with < 1.10 clusters at this time?
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
Thanks will give it a try!
I can confirm that the fix suggested by @lachie83 works for kubernetes 1.8.7. Thanks for that.
Fix - https://github.com/Azure/acs-engine/pull/3688
Thanks again @lachie83!