embed: use ServerName on TLS DNS discovery w/o CA file

release-3.0
Anthony Romano 2016-08-02 17:10:05 -07:00 committed by Gyu-Ho Lee
parent a31283cf51
commit 487b34d857
1 changed files with 3 additions and 0 deletions

View File

@ -561,6 +561,9 @@ func getPeerURLsMapAndToken(cfg *config, which string) (urlsmap types.URLsMap, t
if err != nil {
return nil, "", err
}
if strings.Contains(clusterStr, "https://") && cfg.peerTLSInfo.CAFile == "" {
cfg.peerTLSInfo.ServerName = cfg.DnsCluster
}
urlsmap, err = types.NewURLsMap(clusterStr)
// only etcd member must belong to the discovered cluster.
// proxy does not need to belong to the discovered cluster.