etcdmain: exit after print out ErrDuplicateID

etcd should exit after printing log for unhandlable error.
This commit is contained in:
Yicheng Qin 2015-09-25 14:09:51 -07:00
parent 9de7f24301
commit dc9a75df1c

View File

@ -141,7 +141,6 @@ func Main() {
plog.Errorf("But etcd could not find valid cluster configuration in the given data dir (%s).", cfg.dir)
plog.Infof("Please check the given data dir path if the previous bootstrap succeeded")
plog.Infof("or use a new discovery token if the previous bootstrap failed.")
os.Exit(1)
case discovery.ErrDuplicateName:
plog.Errorf("member with duplicated name has registered with discovery service token(%s).", cfg.durl)
plog.Errorf("please check (cURL) the discovery token for more information.")
@ -162,6 +161,7 @@ func Main() {
}
plog.Fatalf("%v", err)
}
os.Exit(1)
}
osutil.HandleInterrupts()