mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2828 from yichengq/cluster-health-log
etcdctl/cluster_health: improve output if failed to get leader stats
This commit is contained in:
commit
d611904a41
@ -46,9 +46,10 @@ func handleClusterHealth(c *cli.Context) {
|
||||
}
|
||||
|
||||
// do we have a leader?
|
||||
ep, ls0, err := getLeaderStats(tr, client.GetCluster())
|
||||
cl := client.GetCluster()
|
||||
ep, ls0, err := getLeaderStats(tr, cl)
|
||||
if err != nil {
|
||||
fmt.Println("cluster is unhealthy")
|
||||
fmt.Println("cluster may be unhealthy: failed to connect", cl)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user