1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-18 16:36:41 +00:00

Improve port check error message

This commit is contained in:
Sebastiaan van Steenis
2018-05-22 12:26:42 +02:00
committed by Alena Prokharchyk
parent db2486f1a4
commit b6ba732816

View File

@@ -447,7 +447,7 @@ func checkPlaneTCPPortsFromHost(ctx context.Context, host *hosts.Host, portList
logrus.Debugf("[network] Length of containerLog is [%d] on host: %s", len(containerLog), host.Address)
if len(containerLog) > 0 {
portCheckLogs := strings.Join(strings.Split(strings.TrimSpace(containerLog), "\n"), ", ")
return fmt.Errorf("[network] Port check for ports: [%s] failed on host: [%s]", portCheckLogs, host.Address)
return fmt.Errorf("[network] Host [%s] is not able to connect to the following ports: [%s]. Please check network policies and firewall rules", host.Address, portCheckLogs)
}
return nil
}