Removes leader from members and changes name since it's an address.

This commit is contained in:
James Phillips 2016-03-18 17:07:11 -07:00
parent 93c8b496e5
commit 3c883951d7
2 changed files with 1 additions and 6 deletions

View File

@ -67,11 +67,6 @@ func (c *MembersCommand) Run(args []string) int {
} }
defer client.Close() 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 var members []agent.Member
if wan { if wan {
members, err = client.WANMembers() members, err = client.WANMembers()

View File

@ -733,7 +733,7 @@ func (s *Server) Stats() map[string]map[string]string {
"consul": map[string]string{ "consul": map[string]string{
"server": "true", "server": "true",
"leader": fmt.Sprintf("%v", s.IsLeader()), "leader": fmt.Sprintf("%v", s.IsLeader()),
"leader_name": s.raft.Leader(), "leader_addr": s.raft.Leader(),
"bootstrap": fmt.Sprintf("%v", s.config.Bootstrap), "bootstrap": fmt.Sprintf("%v", s.config.Bootstrap),
"known_datacenters": toString(uint64(len(s.remoteConsuls))), "known_datacenters": toString(uint64(len(s.remoteConsuls))),
}, },