1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-31 06:49:54 +00:00

Merge pull request #428 from moelsayed/fix_rancher_12147

Error out on unsuppored docker version instead of Warn
This commit is contained in:
Alena Prokharchyk 2018-03-22 11:35:51 -07:00 committed by GitHub
commit 2f6ead9cf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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])
}