New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate names in ETCD_INITIAL_CLUSTER not handled correctly
#13757
Comments
|
A member can have multiple client or peer URLs. So in this case, you must specify the flag |
|
@ahrtr Would it be okay if I work on this? |
|
@Divya063 Definitely yes. Thank you! |
|
Hey @mortehu After that I ran this command: After adding the member, I exported the required variables and executed etcd listen command: Instead, the error was: Can you please tell me where I went wrong in reproducing the error? I followed the same given commands for terminal x and y. |


What happened?
If you don't pass a
--nameargument to youretcdprocesses, they will all have the namedefaultand the cluster will operate normally. However, when you add a member, the generatedETCD_INITIAL_CLUSTERvariable will have multiple entries with the name "default". When this environment variable is used,etcdwill parse these into a mapping under a single key ("default") with multiple URLs, and create a single member. Seeetcd/server/etcdserver/api/membership/cluster.go
Lines 83 to 86 in 63a1cc3
This leads to the confusing error message "member count is unequal". The documentation on https://etcd.io/docs/v3.5/op-guide/runtime-configuration/ mentions this failure, but the situation is different.
What did you expect to happen?
Either
a.
member addshould fail, saying it cannot generate a validETCD_INITIAL_CLUSTERdue to duplicate names, orb.
etcdshould accept duplicate names inETCD_INITIAL_CLUSTERand treat them as separate members. This can be accomplished by updatingfunc NewClusterFromURLsMapas follows:I don't know if there's a real need to be able to specify multiple URLs for a single member.
How can we reproduce it (as minimally and precisely as possible)?
You need three terminals,
x,y, andz:Anything else we need to know?
No response
Etcd version (please run commands below)
Etcd configuration (command line flags or environment variables)
paste your configuration here
Etcd debug information (please run commands blow, feel free to obfuscate the IP address or FQDN in the output)
etcd 3.5.2
Relevant log output
No response
The text was updated successfully, but these errors were encountered: