-
Notifications
You must be signed in to change notification settings - Fork 886
Closed
Description
When creating a Swarm cluster with IPv6 addresses, a worker will fail to fully join the cluster due to the brackets being stripped. The resulting error is:
time="2016-12-23T07:27:26.368614166Z" level=warning msg="2016/12/23 07:27:26
[WARN] memberlist: Failed to resolve 2001:fd00:4:1000:f816:3eff:fe78:3323:
too many colons in address 2001:fd00:4:1000:f816:3eff:fe78:3323\n"
This is happening during the net.SplitHostPort call here.
A quick patch of:
remoteIP := net.ParseIP(remoteAddr)
if remoteIP.To4() == nil {
remoteAddr = fmt.Sprintf("[%s]", remoteIP)
}resolves the issue and the worker is then able to successfully join the cluster, though I'm not sure if that's the best way to resolve the issue?
Metadata
Metadata
Assignees
Labels
No labels