etcdtcl: fix etcdctl cluster-health ignores SSL settings

etcdctl reconnects to the leader, but was not picking up ssl settings in this
case, which causes it to show unhealthy when this is not the case.

Fixes #2373
release-2.0
James Pharaoh 2015-02-25 13:17:55 +01:00
parent 6648b7e302
commit 05ecdbc617
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ func handleClusterHealth(c *cli.Context) {
// is raft stable and making progress?
client = etcd.NewClient([]string{ep})
client.SetTransport(tr)
resp, err := client.Get("/", false, false)
if err != nil {
fmt.Println("cluster is unhealthy")