etcdmain: better logging when user forget to set initial flags

This commit is contained in:
Xiang Li
2015-09-18 15:18:29 -07:00
committed by Yicheng Qin
parent 72c18eb7ba
commit baaefd18e2
3 changed files with 18 additions and 3 deletions

View File

@@ -100,7 +100,7 @@ func (c *ServerConfig) verifyLocalMember(strict bool) error {
urls.Sort()
if strict {
if !netutil.URLStringsEqual(apurls, urls.StringSlice()) {
return fmt.Errorf("advertise URLs of %q do not match in --initial-advertise-peer-urls %s and --initial-cluster %s", c.Name, apurls, urls.StringSlice())
return fmt.Errorf("--initial-cluster must include %s=%s given --initial-advertise-peer-urls=%s", c.Name, apurls, apurls)
}
}
return nil