mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-30 05:43:58 +00:00
Automatic merge from submit-queue (batch tested with PRs 45877, 46846, 46630, 46087, 47003) gpusInUse info error when kubelet restarts **What this PR does / why we need it**: In my test, I found 2 errors in the nvidia_gpu_manager.go. 1. the number of activePods in gpusInUse() equals to 0 when kubelet restarts. It seems the Start() method was called before pods recovery which caused this error. So I decide not to call gpusInUse() in the Start() function, just let it happen when new pod needs to be created. 2. the container.ContainerID in line 242 returns the id in format of "docker://<container_id>", this will make the client failed to inspect the container by id. We have to erase the prefix of "docker://". **Special notes for your reviewer**: **Release note**: ``` Avoid assigning the same GPU to multiple containers. ```