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: fix creating member dir #4089

Merged
merged 2 commits into from
Dec 29, 2015
Merged

etcdserver: fix creating member dir #4089

merged 2 commits into from
Dec 29, 2015

Conversation

xiang90
Copy link
Contributor

@xiang90 xiang90 commented Dec 29, 2015

@gyuho I reverted your previous fix since that is a partial fix, which does not cover the discovery case.

I feel this is a easier way to fix the root problem. We should not create member dir before validation.

This commit fixes the issue of creating member dir before validating
the configuration. When member dir exists, it indicates the local etcd
process is a valid etcd member. So we should only create member dir
after we finish configuration validation, joining validation or
discovery validation.
@gyuho
Copy link
Contributor

gyuho commented Dec 29, 2015

Got it. LGTM. Thanks for fixing this!

@xiang90
Copy link
Contributor Author

xiang90 commented Dec 29, 2015

@gyuho Can you also give this a quick test. So we know it does fix #3827?

@gyuho
Copy link
Contributor

gyuho commented Dec 29, 2015

Sure, give me a sec.

@gyuho
Copy link
Contributor

gyuho commented Dec 29, 2015

@xiang90 Just tested manually assigning errors and confirmed that it doesn't create directories when bootstrap fails.

xiang90 added a commit that referenced this pull request Dec 29, 2015
etcdserver: fix creating member dir
@xiang90 xiang90 merged commit f176179 into etcd-io:master Dec 29, 2015
@xiang90 xiang90 deleted the fix branch December 29, 2015 07:37
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.

None yet

2 participants