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

If WaitForMastership fails log_signer sits around doing nothing #1150

Closed
rolandshoemaker opened this issue May 24, 2018 · 6 comments · Fixed by #2291
Closed

If WaitForMastership fails log_signer sits around doing nothing #1150

rolandshoemaker opened this issue May 24, 2018 · 6 comments · Fixed by #2291
Assignees
Labels

Comments

@rolandshoemaker
Copy link
Contributor

If the call to WaitForMastership fails in electionRunner.Run it returns from the function and sits around doing nothing for that log (i.e. masterFor calls will always return empty and nothing can be done). This can be triggered by recoverable intermittent etcd issues.

The return should either be replaced with continue (perhaps with a backoff?) when hitting errors from WaitforMastership or the electionRunner should be removed from l.electionRunner[logID] when it exits so a new election goroutine can be created the next time masterFor is called. I'd probably go for the first of the two options.

@pav-kv
Copy link
Contributor

pav-kv commented May 25, 2018

Hi Roland, thanks for filing this. I am working right now on factoring out the election runner, and also noticed this issue. I have a work-in-progress PR that largely interferes with this code. Would you like to review that?

@rolandshoemaker
Copy link
Contributor Author

Ah cool, I'll take a look, thanks!

@Martin2112 Martin2112 added the bug label Jun 1, 2018
@Martin2112
Copy link
Contributor

Did #1144 fix your issue?

@pav-kv
Copy link
Contributor

pav-kv commented Aug 10, 2018

No, that was a refactoring, and it ended up postponed.

@pav-kv
Copy link
Contributor

pav-kv commented Jan 22, 2021

This is effectively fixed now. Election code has migrated to util/election (types Runner and MasterTracker). If election fails at any step, it will be attempted again.

@pav-kv
Copy link
Contributor

pav-kv commented Jan 22, 2021

No, actually the problem seems to be still there:

r.Run(innerCtx, o.pendingResignations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants