From e4ca18089f712c72490e3ca8f3e35e25487fd1e4 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Fri, 18 Mar 2016 17:07:11 -0700 Subject: [PATCH] Removes leader from members and changes name since it's an address. --- command/members.go | 5 ----- consul/server.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/command/members.go b/command/members.go index 60805608d..f9134a9a8 100644 --- a/command/members.go +++ b/command/members.go @@ -67,11 +67,6 @@ func (c *MembersCommand) Run(args []string) int { } defer client.Close() - leader, err := client.Stats() - if err == nil { - c.Ui.Output(fmt.Sprintf("Leader: %s", leader["consul"]["leader_name"])) - } - var members []agent.Member if wan { members, err = client.WANMembers() diff --git a/consul/server.go b/consul/server.go index bfe13ef45..b9adc8833 100644 --- a/consul/server.go +++ b/consul/server.go @@ -733,7 +733,7 @@ func (s *Server) Stats() map[string]map[string]string { "consul": map[string]string{ "server": "true", "leader": fmt.Sprintf("%v", s.IsLeader()), - "leader_name": s.raft.Leader(), + "leader_addr": s.raft.Leader(), "bootstrap": fmt.Sprintf("%v", s.config.Bootstrap), "known_datacenters": toString(uint64(len(s.remoteConsuls))), },