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

Handle zen1 minimum_master_nodes special case for 2->1 masters #1551

Merged
merged 7 commits into from
Aug 20, 2019

Conversation

sebgl
Copy link
Contributor

@sebgl sebgl commented Aug 12, 2019

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).

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.
@sebgl sebgl added the justdoit Continuous improvement not related to a specific feature label Aug 12, 2019
@sebgl
Copy link
Contributor Author

sebgl commented Aug 12, 2019

Jenkins test this please.

Copy link
Collaborator

@pebrc pebrc left a 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

Copy link
Contributor

@david-kow david-kow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few questions.

@sebgl sebgl requested review from pebrc and barkbay August 19, 2019 20:01
Copy link
Contributor

@barkbay barkbay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@sebgl sebgl merged commit cab3ea3 into elastic:master Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
justdoit Continuous improvement not related to a specific feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants