Skip to content

Commit

Permalink
server/join: log detailed info when a join failure member is detected (
Browse files Browse the repository at this point in the history
…#8243)

ref #7983

Log the detailed info when a join failure member is detected to help troubleshoot.

Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato authored Jun 4, 2024
1 parent a929a54 commit fcec188
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/join/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ func PrepareJoinCluster(cfg *config.Config) error {
existed := false
for _, m := range listResp.Members {
if len(m.Name) == 0 {
return errors.New("there is a member that has not joined successfully")
log.Error("there is an abnormal joined member in the current member list",
zap.Uint64("id", m.ID),
zap.Strings("peer-urls", m.PeerURLs),
zap.Strings("client-urls", m.ClientURLs))
return errors.Errorf("there is a member %d that has not joined successfully", m.ID)
}
if m.Name == cfg.Name {
existed = true
Expand Down Expand Up @@ -184,7 +188,11 @@ func PrepareJoinCluster(cfg *config.Config) error {
listSucc = true
}
if len(n) == 0 {
return errors.New("there is a member that has not joined successfully")
log.Error("there is an abnormal joined member in the current member list",
zap.Uint64("id", memb.ID),
zap.Strings("peer-urls", memb.PeerURLs),
zap.Strings("client-urls", memb.ClientURLs))
return errors.Errorf("there is a member %d that has not joined successfully", memb.ID)
}
for _, m := range memb.PeerURLs {
pds = append(pds, fmt.Sprintf("%s=%s", n, m))
Expand Down

0 comments on commit fcec188

Please sign in to comment.