Skip to content

Commit 4235e69

Browse files
committed
fix crash with rm when kubelet request timeouts
Signed-off-by: Tuomas Katila <[email protected]>
1 parent 6348513 commit 4235e69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func (rm *resourceManager) listPods() (*v1.PodList, error) {
337337
for i := 0; i < kubeletAPIMaxRetries; i++ {
338338
if podList, err := rm.listPodsFromKubelet(); err == nil {
339339
return podList, nil
340-
} else if errors.As(err, neterr); neterr.Timeout() {
340+
} else if errors.As(err, &neterr) && neterr.Timeout() {
341341
continue
342342
}
343343

0 commit comments

Comments
 (0)