Skip to content
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

etcdserver: better warning when initial-cluster doesn't match advertise urls #8083

Merged
merged 1 commit into from
Jun 12, 2017

Conversation

heyitsanthony
Copy link
Contributor

The old error was not clear about what URLs needed to be added, sometimes
truncating the list. To make it clearer, print out the missing entries
for --initial-cluster and print the full list of initial advertise peers.

Fixes #8079 and #7927

Old output:

etcdmain: --initial-cluster must include etcd01=http://172.28.0.4:2380 given --initial-advertise-peer-urls=http://172.28.0.4:2380

New output:

etcdmain: --initial-cluster has etcd01=http://172.28.0.2:2380 but missing from --initial-advertise-peer-urls=http://172.28.0.4:2380

return fmt.Errorf("--initial-cluster has %s but missing from --initial-advertise-peer-urls=%s ", mstr, apStr)
}
umap := types.URLsMap(map[string]types.URLs{c.Name: c.PeerURLs})
return fmt.Errorf("--initial-advertise-peer-urls=%s but missing from --initial-cluster=%s", apStr, umap.String())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this accurate? apStr are all the urls, not just the missing ones as what we do for line 145?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, dumping all of them now; will scan for the missing entries

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks!

@xiang90
Copy link
Contributor

xiang90 commented Jun 12, 2017

lgtm

…se urls

The old error was not clear about what URLs needed to be added, sometimes
truncating the list. To make it clearer, print out the missing entries
for --initial-cluster and print the full list of initial advertise peers.

Fixes etcd-io#8079 and etcd-io#7927
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants