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

KeepLeadership can swallow exceptions #133

Open
AzureView opened this issue Jun 2, 2021 · 0 comments
Open

KeepLeadership can swallow exceptions #133

AzureView opened this issue Jun 2, 2021 · 0 comments

Comments

@AzureView
Copy link

If using the leader function we find that there is a problem with the failover.

If have a single instance of service which has aquired the leadership lock, but then kill consul on that server. When subsequently we restart consul the service should reaquire the leadership lock (assuming there was no other instance of the service running which had aquired the lock). However it does not re-aquire the leadership lock.

Similary if have a second instance of the service running which aquires the lock when consul is killed on the server where the instance had originally aquired the lock - then thre is no log message to say the original instance lost the lock.

I believe the issue that needs to be fixe is that any exception in the KeepLeadership loop in LeaderWatcher is swallower and the loop stops. It may need to have try catch similar tot he the watcherLoop in ServiceWatcher.

Thanks Derek

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

No branches or pull requests

1 participant