mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix: add a warning message on startup if the server name is default
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
This commit is contained in:
parent
e5790d204c
commit
d4fbfb8cfb
@ -90,6 +90,10 @@ func startEtcdOrProxyV2(args []string) {
|
|||||||
lg.Info("failed to detect default host", zap.Error(dhErr))
|
lg.Info("failed to detect default host", zap.Error(dhErr))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.ec.Name == embed.DefaultName {
|
||||||
|
lg.Warn("the server is using default name, which might cause error that failed the startup.")
|
||||||
|
}
|
||||||
|
|
||||||
if cfg.ec.Dir == "" {
|
if cfg.ec.Dir == "" {
|
||||||
cfg.ec.Dir = fmt.Sprintf("%v.etcd", cfg.ec.Name)
|
cfg.ec.Dir = fmt.Sprintf("%v.etcd", cfg.ec.Name)
|
||||||
lg.Warn(
|
lg.Warn(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user