-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
keyring: filter by region before checking version #14901
Conversation
In #14821 we fixed a panic that can happen if a leadership election happens in the middle of an upgrade. That fix checks that all servers are at the minimum version before initializing the keyring (which blocks evaluation processing during trhe upgrade). But the check we implemented is over the serf membership, which includes servers in any federated regions, which don't necessarily have the same upgrade cycle. Filter the version check by the leader's region.
bcf444b
to
449debd
Compare
(An alternate approach here could be to get the localPeers as done in the keyring replication: Lines 514 to 523 in 9cdbbbb
|
Tests are green now, but I got this failure twice... it looks like a flake and but it also looks like it's potentially relevant, but I can't figure out where it's coming from yet.
Edit: nevermind, this is in CircleCI's flaky test set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline we need to check our other uses of ServersMeetMinimumVersion and ensure if they're local-only they do this region check, but if they're global (eg ACL related objects) they need to check all members.
Great find on this, I can't believe it hasn't bitten us before. Although I wonder if it has in such a subtle way that we didn't realize it. In other spots this would more or less silently prevent using a new code path.
I'm going to merge this one, and then take a pass thru the existing uses of |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
In #14821 we fixed a panic that can happen if a leadership election happens in the middle of an upgrade. That fix checks that all servers are at the minimum version before initializing the keyring (which blocks evaluation processing during trhe upgrade). But the check we implemented is over the serf membership, which includes servers in any federated regions, which don't necessarily have the same upgrade cycle.
Filter the version check by the leader's region.
Fixes #14896 but this fix makes me wonder if we have other lurking bugs in this version check.