-
Notifications
You must be signed in to change notification settings - Fork 697
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
Handle zen1 minimum_master_nodes special case for 2->1 masters #1551
Conversation
Instead of always updating zen1 before removing a master node, which can lead to split brain scenarios, make sure we update zen1 if we are moving from 2 to 1 master nodes. In other scenarios (eg. 3->2), we want to update minimum_master_nodes after the node is removed. This works fine as long as we remove one master at a time. We check the actual running master pods in the cluster to determine if we are downscaling a master when 2 masters are currently running. This is not a perfect solution since we are relying on potentially out-of-date k8s cached information, but we cannot do something 100% realtime perfect.
Jenkins test this please. |
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.
LGTM in general, one question about the basis for the check see below
operators/pkg/controller/elasticsearch/driver/downscale_test.go
Outdated
Show resolved
Hide resolved
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.
Few questions.
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.
LGTM !
Instead of always updating zen1 before removing a master node, which can
lead to split brain scenarios, make sure we update zen1 if we are moving
from 2 to 1 master nodes.
In other scenarios (eg. 3->2), we want to update minimum_master_nodes
after the node is removed. This works fine as long as we remove one
master at a time.
We check the actual running master pods in the cluster to determine if
2 masters are currently running.
This is not a perfect solution since we are relying on potentially
out-of-date k8s cached information, but we cannot do something 100%
realtime perfect.
Relates #1281.
Requires masters to be downscaled one by one to pass E2E tests (implemented in #1549).