Revert "embed: fix HTTPs + DNS SRV discovery"

This reverts commit f79d5aaca475f6d36985856f2fba5b2ed3df7249.
This commit is contained in:
Gyu-Ho Lee 2017-11-15 10:14:21 -08:00
parent d5572964e1
commit d3a3c3154e

View File

@ -331,9 +331,7 @@ func (cfg *Config) PeerURLsMapAndToken(which string) (urlsmap types.URLsMap, tok
}
clusterStr := strings.Join(clusterStrs, ",")
if strings.Contains(clusterStr, "https://") && cfg.PeerTLSInfo.CAFile == "" {
// SRV targets have subdomains under the given DNSCluster, so wildcard matching
// is needed.
cfg.PeerTLSInfo.ServerName = "*." + cfg.DNSCluster
cfg.PeerTLSInfo.ServerName = cfg.DNSCluster
}
urlsmap, err = types.NewURLsMap(clusterStr)
// only etcd member must belong to the discovered cluster.