Browse Source

Merge pull request #2422 from xiang90/fix_etcdctl

etcdctl: mark unstarted member
Xiang Li 10 years ago
parent
commit
559466e996
1 changed files with 5 additions and 1 deletions
  1. 5 1
      etcdctl/command/member_commands.go

+ 5 - 1
etcdctl/command/member_commands.go

@@ -104,7 +104,11 @@ func actionMemberList(c *cli.Context) {
 	}
 
 	for _, m := range members {
-		fmt.Printf("%s: name=%s peerURLs=%s clientURLs=%s\n", m.ID, m.Name, strings.Join(m.PeerURLs, ","), strings.Join(m.ClientURLs, ","))
+		if len(m.Name) == 0 {
+			fmt.Printf("%s[unstarted]: peerURLs=%s\n", m.ID, strings.Join(m.PeerURLs, ","))
+		} else {
+			fmt.Printf("%s: name=%s peerURLs=%s clientURLs=%s\n", m.ID, m.Name, strings.Join(m.PeerURLs, ","), strings.Join(m.ClientURLs, ","))
+		}
 	}
 }