1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-31 14:52:19 +00:00

Error out on unsuppored docker version instead of Warn

This commit is contained in:
moelsayed 2018-03-22 03:53:34 +02:00
parent b2dcc41dc4
commit 914ca06e2c

View File

@ -2,6 +2,7 @@ package cluster
import (
"fmt"
"strings"
"context"
@ -31,6 +32,10 @@ func (c *Cluster) TunnelHosts(ctx context.Context, local bool) error {
uniqueHosts := hosts.GetUniqueHostList(c.EtcdHosts, c.ControlPlaneHosts, c.WorkerHosts)
for i := range uniqueHosts {
if err := uniqueHosts[i].TunnelUp(ctx, c.DockerDialerFactory); err != nil {
// Unsupported Docker version is NOT a connectivity problem that we can't recover! So we bail out on it
if strings.Contains(err.Error(), "Unsupported Docker version found") {
return err
}
log.Warnf(ctx, "Failed to set up SSH tunneling for host [%s]: %v", uniqueHosts[i].Address, err)
c.InactiveHosts = append(c.InactiveHosts, uniqueHosts[i])
}