From 6c8b32d316fa72aca258b7bcd7c5d3d1e045cd47 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Thu, 11 Jun 2015 15:44:57 -0700 Subject: [PATCH] etcdmain: exit if discovery fails Fix #2919 If discovery fails, etcd will hang there and does nothing. This commit fixes the problem. --- etcdmain/etcd.go | 1 + 1 file changed, 1 insertion(+) diff --git a/etcdmain/etcd.go b/etcdmain/etcd.go index 64f2644fa..c4619492c 100644 --- a/etcdmain/etcd.go +++ b/etcdmain/etcd.go @@ -112,6 +112,7 @@ func Main() { plog.Errorf("But etcd could not find vaild 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) default: plog.Fatalf("%v", err) }