mirror of
https://github.com/rancher/rke.git
synced 2025-09-17 15:40:07 +00:00
Don't retry on Docker error address already in use
This commit is contained in:
committed by
Alena Prokharchyk
parent
3543fd106f
commit
8a3b24caac
@@ -397,6 +397,9 @@ func StartContainer(ctx context.Context, dClient *client.Client, hostname string
|
|||||||
logrus.Infof("Starting container [%s] on host [%s], try #%d", containerName, hostname, i)
|
logrus.Infof("Starting container [%s] on host [%s], try #%d", containerName, hostname, i)
|
||||||
err = dClient.ContainerStart(ctx, containerName, types.ContainerStartOptions{})
|
err = dClient.ContainerStart(ctx, containerName, types.ContainerStartOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if strings.Contains(err.Error(), "bind: address already in use") {
|
||||||
|
return err
|
||||||
|
}
|
||||||
logrus.Warningf("Can't start Docker container [%s] on host [%s]: %v", containerName, hostname, err)
|
logrus.Warningf("Can't start Docker container [%s] on host [%s]: %v", containerName, hostname, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user