Skip to content

Commit

Permalink
wrap ipv6 addrs
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-deboer committed Mar 19, 2017
1 parent 0f9fc5a commit 177e43d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/platform/vsphere/vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ func (vs *VSphere) ExpectedMembers(
return nil, err
}
member := etcd.Member{Name: name, ClientURLs: []string{}, PeerURLs: []string{}}
for _, addr := range addrs {
for _, a := range addrs {
addr := a
if strings.Contains(a, ":") {
addr = "[" + a + "]"
}
member.ClientURLs = append(member.ClientURLs, fmt.Sprintf("%s://%s:%d", clientScheme, addr, clientPort))
member.PeerURLs = append(member.PeerURLs, fmt.Sprintf("%s://%s:%d", serverScheme, addr, serverPort))
}
Expand Down

0 comments on commit 177e43d

Please sign in to comment.