From a5caa53a576811ef3c38026e0f2d1b1d0d957c53 Mon Sep 17 00:00:00 2001 From: Claes Mogren Date: Tue, 7 May 2019 10:56:34 -0700 Subject: [PATCH] No pods is not an error --- ipamd/ipamd.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ipamd/ipamd.go b/ipamd/ipamd.go index e7344b1f76..43052e617f 100644 --- a/ipamd/ipamd.go +++ b/ipamd/ipamd.go @@ -315,12 +315,16 @@ func (c *IPAMContext) getLocalPodsWithRetry() ([]*k8sapi.K8SPodInfo, error) { time.Sleep(retryK8SInterval) } + if err != nil { + return nil, err + } + if pods == nil { - return nil, errors.New("unable to get local pods, giving up") + log.Info("No pods found on this node") + return pods, nil } var containers map[string]*docker.ContainerInfo - for retry := 1; retry <= maxK8SRetries; retry++ { containers, err = c.dockerClient.GetRunningContainers() if err == nil {