Skip to content

Commit ce45c83

Browse files
committed
etcdserver: add detailed errors in "ValidateClusterAndAssignIDs"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
1 parent e1de749 commit ce45c83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

etcdserver/membership/cluster.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ func ValidateClusterAndAssignIDs(local *RaftCluster, existing *RaftCluster) erro
490490
ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second)
491491
defer cancel()
492492
for i := range ems {
493-
if !netutil.URLStringsEqual(ctx, ems[i].PeerURLs, lms[i].PeerURLs) {
494-
return fmt.Errorf("unmatched member while checking PeerURLs")
493+
if ok, err := netutil.URLStringsEqual(ctx, ems[i].PeerURLs, lms[i].PeerURLs); !ok {
494+
return fmt.Errorf("unmatched member while checking PeerURLs (%v)", err)
495495
}
496496
lms[i].ID = ems[i].ID
497497
}

0 commit comments

Comments
 (0)