chore: update the warn message on startup when the server name is default

Signed-off-by: nic-chen <chenjunxu6@gmail.com>
This commit is contained in:
nic-chen 2022-10-28 20:56:45 +08:00
parent 52cac17c24
commit 6f6275e1ab

View File

@ -771,7 +771,10 @@ func (cfg *Config) Validate() error {
// because each member can have multiple client or peer URLs.
// Please refer to https://github.com/etcd-io/etcd/issues/13757
if cfg.Name == DefaultName {
cfg.logger.Warn("the server is using default name, which might cause error that failed the startup.")
cfg.logger.Warn(
"it isn't recommended to use default name, please set a value for --name. "+
"Note that etcd might run into issue when multiple members have the same default name",
zap.String("name", cfg.Name))
}
return nil