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

Need to avoid issues caused by multiple node servers refreshing the token #57

Closed
jimboca opened this issue Aug 10, 2020 · 2 comments
Closed

Comments

@jimboca
Copy link
Collaborator

jimboca commented Aug 10, 2020

We had an issue where kubernetes shut down the node server to move it, but it took a long time for it to exit, then the new one started up but it's tokens were invalid by the time it tried to refresh them because the old one had done a refresh.

So need to create a wait_for_update function which:

  • Checks that our current token is the latest token, in case someone already refreshed it
  • Checks if someone else is updating the token, if not, then put info in the DB to say we are updating
    • If so waits for other to finish and passes back the new token
  • Needs to time out based on the time the first one started the update

I think this catches everything, except a race condition that can occur at the start before we "lock" the db.

jimboca added a commit that referenced this issue Aug 30, 2020
@jimboca
Copy link
Collaborator Author

jimboca commented Aug 30, 2020

Fixes are in 2.1.24, although as mentioned there is still a hole due to no DB locking.

jimboca added a commit that referenced this issue Sep 5, 2020
jimboca added a commit that referenced this issue Sep 5, 2020
@jimboca
Copy link
Collaborator Author

jimboca commented Dec 25, 2020

Fixed in 2.1.32 which does it's on db locking.

@jimboca jimboca closed this as completed Dec 25, 2020
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