Skip to content

Conversation

DaveCTurner
Copy link
Contributor

Today any node can win an election. However, the whole point of
master-eligibility is that master-ineligible nodes should not be elected as the
leader; furthermore master-ineligible nodes do not have any outgoing STATE
channels so cannot publish cluster states, so their leadership is ineffective
and disruptive.

This change ensures that the elected leader is master-eligible by preventing
master-ineligible nodes from scheduling an election.

Today any node can win an election. However, the whole point of
master-eligibility is that master-ineligible nodes should not be elected as the
leader; furthermore master-ineligible nodes do not have any outgoing STATE
channels so cannot publish cluster states, so their leadership is ineffective
and disruptive.

This change ensures that the elected leader is master-eligible by preventing
master-ineligible nodes from scheduling an election.
@DaveCTurner DaveCTurner added >bug v7.0.0 :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. labels Nov 28, 2018
@DaveCTurner DaveCTurner requested a review from ywelsch November 28, 2018 13:03
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

internalCluster().startDataOnlyNode();
internalCluster().stopCurrentMasterNode();
// There's only one master-eligible node left so it should elect itself pretty quickly.
assertFalse(client().admin().cluster().prepareHealth().setTimeout(TimeValue.timeValueSeconds(10)).get().isTimedOut());
Copy link
Contributor

Choose a reason for hiding this comment

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

can we write this as a CoordinatorTest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can - see 2de0feb.

@ywelsch ywelsch mentioned this pull request Nov 28, 2018
61 tasks
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@DaveCTurner DaveCTurner merged commit 87408b0 into elastic:zen2 Nov 29, 2018
@DaveCTurner DaveCTurner deleted the 2018-11-28-only-elect-master-eligible-nodes branch November 29, 2018 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants