Skip to content

Commit

Permalink
Merge pull request #453 from mogren/master
Browse files Browse the repository at this point in the history
No pods is not an error
  • Loading branch information
Claes Mogren authored May 7, 2019
2 parents 6fe1ecf + a5caa53 commit 3460788
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ipamd/ipamd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3460788

Please sign in to comment.