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

consul lock behaviour on leader election #1162

Closed
jeinwag opened this issue Aug 7, 2015 · 3 comments · Fixed by #1567
Closed

consul lock behaviour on leader election #1162

jeinwag opened this issue Aug 7, 2015 · 3 comments · Fixed by #1567
Assignees
Labels
type/bug Feature does not function as expected

Comments

@jeinwag
Copy link

jeinwag commented Aug 7, 2015

Already asked this question here, but I thought I'd open a seperate issue:
Currently, when the cluster leader goes down and an election happens, all consul lock processes which have previously acquired locks will terminate immediately.

Is that really the intended behaviour?

If you use consul lock to implement a hot standby for singleton services (as described in the docs), that means that an election will trigger a failover for all such services. I just don't think that's very practical.

@armon
Copy link
Member

armon commented Aug 7, 2015

@jeinwag It is not intended behavior, we just need special case handling of the "no cluster leader" return. The consul lock command err's on the side of caution and aborts if it encounters any error, but the lock is still "held" even if a leader election happens.

From the perspective of the servers that client still holds the the lock, but the client is not teasing apart different errors to determine if its safe to continue. Makes sense?

@armon armon added the type/bug Feature does not function as expected label Aug 7, 2015
@armon
Copy link
Member

armon commented Aug 7, 2015

I've tagged this as a bug, since we can do a better job given that error.

@jeinwag
Copy link
Author

jeinwag commented Aug 10, 2015

I suspected that this might be an error-handling issue, thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants