etcd: Rewrite embed etcd implementation
This is a giant cleanup of the etcd code. The earlier version was written when I was less experienced with golang. This is still not perfect, and does contain some races, but at least it's a decent base to start from. The automatic elastic clustering should be considered an experimental feature. If you need a more battle-tested cluster, then you should manage etcd manually and point mgmt at your existing cluster.
This commit is contained in:
@@ -175,14 +175,19 @@ func run(c *cli.Context, name string, gapiObj gapi.GAPI) error {
|
||||
reterr := obj.Run()
|
||||
if reterr != nil {
|
||||
// log the error message returned
|
||||
log.Printf("main: Error: %v", reterr)
|
||||
if obj.Flags.Debug {
|
||||
log.Printf("main: %+v", reterr)
|
||||
}
|
||||
}
|
||||
|
||||
if err := obj.Close(); err != nil {
|
||||
log.Printf("main: Close: %v", err)
|
||||
if obj.Flags.Debug {
|
||||
log.Printf("main: Close: %+v", err)
|
||||
}
|
||||
if reterr == nil {
|
||||
return err
|
||||
}
|
||||
reterr = errwrap.Append(reterr, err)
|
||||
}
|
||||
|
||||
return reterr
|
||||
|
||||
Reference in New Issue
Block a user