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

auth: protect simpleToken with single mutex and check if enabled #7729

Merged
merged 2 commits into from
Apr 13, 2017

Conversation

heyitsanthony
Copy link
Contributor

Dual locking doesn't really give a convincing performance improvement and
the lock ordering makes it impossible to safely check if the TTL keeper
is enabled or not.

/cc @raoofm @mitake

Fixes #7722

Anthony Romano added 2 commits April 12, 2017 13:17
etcd was crashing since auth was assuming a token implies auth is enabled.
Dual locking doesn't really give a convincing performance improvement and
the lock ordering makes it impossible to safely check if the TTL keeper
is enabled or not.

Fixes etcd-io#7722
@heyitsanthony
Copy link
Contributor Author

An alternative to this is totally getting rid of the AuthEnable/AuthDisable anti-pattern from the AuthStore interface and have etcdserver dynamically add/remove Auth layer, which would entirely eliminate this class of bugs.

@gyuho
Copy link
Contributor

gyuho commented Apr 12, 2017

LGTM. I will backport this with another patch release (probably on next Monday).

@mitake
Copy link
Contributor

mitake commented Apr 13, 2017

lgtm, thanks!

@heyitsanthony heyitsanthony merged commit 0b19921 into etcd-io:master Apr 13, 2017
@heyitsanthony heyitsanthony deleted the fix-auth-token-crash branch April 13, 2017 18:23
@mitake mitake mentioned this pull request Apr 14, 2017
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