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

Use m_m_nodes from Zen1 master for Zen2 bootstrap #37701

Conversation

DaveCTurner
Copy link
Contributor

Today we support a smooth rolling upgrade from Zen1 to Zen2 by automatically
bootstrapping the cluster once all the Zen1 nodes have left, as long as the
minimum_master_nodes count is satisfied. However this means that Zen2 nodes
also require the minimum_master_nodes setting for this one specific and
transient situation.

Since nodes only perform this automatic bootstrapping if they previously
belonged to a Zen1 cluster, they can keep track of the minimum_master_nodes
setting from the previous master instead of requiring it to be set on the Zen2
node.


NB: The first commit on this branch, c69f13c, adds the minimumMasterNodesOnPublishingMaster field to the cluster state and is intended to be backported to 6.x. I'm starting with a single PR for the whole thing for initial discussion, then I will open a separate PR just for the backportable bits and merge & backport it first.

To safely support rolling upgrades from 6.x to 7.x we need the 7.x nodes to
have access to the `minimum_master_nodes` setting, but this setting is
otherwise unnecessary in 7.x and we would like to remove it.  Since a rolling
upgrade from 6.x to 7.x involves the 7.x nodes joining a 6.x master, we can
avoid the need for setting `minimum_master_nodes` on the 7.x nodes by copying
the value set on the 6.x master.

This change exposes the master's node-level value for `minimum_master_nodes`
via a field in the cluster state.
Today we support a smooth rolling upgrade from Zen1 to Zen2 by automatically
bootstrapping the cluster once all the Zen1 nodes have left, as long as the
`minimum_master_nodes` count is satisfied. However this means that Zen2 nodes
also require the `minimum_master_nodes` setting for this one specific and
transient situation.

Since nodes only perform this automatic bootstrapping if they previously
belonged to a Zen1 cluster, they can keep track of the `minimum_master_nodes`
setting from the previous master instead of requiring it to be set on the Zen2
node.
@DaveCTurner DaveCTurner added >enhancement v7.0.0 :Distributed/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. labels Jan 22, 2019
@ywelsch ywelsch mentioned this pull request Jan 22, 2019
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.

Looks good overall. I've left some minor comments.

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. Thanks @DaveCTurner

@DaveCTurner DaveCTurner merged commit bdef2ab into elastic:master Jan 24, 2019
@DaveCTurner DaveCTurner deleted the 2019-01-22-ignore-minimum-master-nodes-in-zen2 branch January 24, 2019 08:57
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 24, 2019
* elastic/master:
  Optimize warning header de-duplication (elastic#37725)
  Bubble exceptions up in ClusterApplierService (elastic#37729)
  SQL: Improve handling of invalid args for PERCENTILE/PERCENTILE_RANK (elastic#37803)
  Remove unused ThreadBarrier class (elastic#37666)
  Add built-in user and role for code plugin (elastic#37030)
  Consolidate testclusters tests into a single project (elastic#37362)
  Fix docs for MappingUpdatedAction
  SQL: Introduce SQL DATE data type (elastic#37693)
  disabling bwc test while backporting elastic#37639
  Mute ClusterDisruptionIT testAckedIndexing
  Set acking timeout to 0 on dynamic mapping update (elastic#31140)
  Remove index audit output type (elastic#37707)
  Mute FollowerFailOverIT testReadRequestsReturnsLatestMappingVersion
  [ML] Increase close job timeout and lower the max number (elastic#37770)
  Remove Custom Listeners from SnapshotsService (elastic#37629)
  Use m_m_nodes from Zen1 master for Zen2 bootstrap (elastic#37701)
  Fix index filtering in follow info api. (elastic#37752)
  Use project dependency instead of substitutions for distributions (elastic#37730)
  Update authenticate to allow unknown fields (elastic#37713)
  Deprecate HLRC EmptyResponse used by security (elastic#37540)
DaveCTurner added a commit that referenced this pull request Jan 24, 2019
This completes the BWC serialisation changes required for a 6.7 master to
inform other nodes of the node-level value of the `minimum_master_nodes`
setting.

Relates #37701, #37811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >enhancement v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants