Browse Source

Merge pull request #2963 from xiang90/fix_discovery_error

etcdmain: exit if discovery fails
Xiang Li 10 years ago
parent
commit
d8e1950d4e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      etcdmain/etcd.go

+ 1 - 0
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.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("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.")
 			plog.Infof("or use a new discovery token if the previous bootstrap failed.")
+			os.Exit(1)
 		default:
 		default:
 			plog.Fatalf("%v", err)
 			plog.Fatalf("%v", err)
 		}
 		}