File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -156,9 +156,16 @@ func (c *ServerConfig) advertiseMatchesCluster() error {
156
156
missing = append (missing , url )
157
157
}
158
158
}
159
- mstr := strings .Join (missing , "," )
159
+ if len (missing ) > 0 {
160
+ mstr := strings .Join (missing , "," )
161
+ umap := types .URLsMap (map [string ]types.URLs {c .Name : c .PeerURLs })
162
+ return fmt .Errorf ("--initial-advertise-peer-urls has %s but missing from --initial-cluster=%s" , mstr , umap .String ())
163
+ }
164
+
165
+ // resolved URLs from "--initial-advertise-peer-urls" and "--initial-cluster" did not match or failed
166
+ apStr := strings .Join (apurls , "," )
160
167
umap := types .URLsMap (map [string ]types.URLs {c .Name : c .PeerURLs })
161
- return fmt .Errorf ("--initial-advertise-peer-urls has %s but missing from --initial-cluster=%s" , mstr , umap .String ())
168
+ return fmt .Errorf ("failed to resolve %s to match --initial-cluster=%s" , apStr , umap .String ())
162
169
}
163
170
164
171
func (c * ServerConfig ) MemberDir () string { return filepath .Join (c .DataDir , "member" ) }
You can’t perform that action at this time.
0 commit comments