Merge pull request #7517 from jsok/7516-discovery-flags

embed: Delay setting initial cluster
release-3.2
Xiang Li 2017-03-16 09:17:42 -07:00 committed by GitHub
commit 5015480e0c
1 changed files with 3 additions and 0 deletions

View File

@ -246,6 +246,9 @@ func (cfg *configYAML) configFromFile(path string) error {
cfg.ACUrls = []url.URL(u)
}
if (cfg.Durl != "" || cfg.DNSCluster != "") && cfg.InitialCluster == cfg.InitialClusterFromName(cfg.Name) {
cfg.InitialCluster = ""
}
if cfg.ClusterState == "" {
cfg.ClusterState = ClusterStateFlagNew
}