mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
fix crash with rm when kubelet request timeouts
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
This commit is contained in:
parent
ea659a5e4b
commit
827b9a0ced
@ -337,7 +337,7 @@ func (rm *resourceManager) listPods() (*v1.PodList, error) {
|
|||||||
for i := 0; i < kubeletAPIMaxRetries; i++ {
|
for i := 0; i < kubeletAPIMaxRetries; i++ {
|
||||||
if podList, err := rm.listPodsFromKubelet(); err == nil {
|
if podList, err := rm.listPodsFromKubelet(); err == nil {
|
||||||
return podList, nil
|
return podList, nil
|
||||||
} else if errors.As(err, neterr); neterr.Timeout() {
|
} else if errors.As(err, &neterr) && neterr.Timeout() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user