-
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
Rename reserved node id '_must_join_elected_master_' to '_must_join_elected_cluster_manager_' that used by in DetachClusterCommand #3116
Conversation
…lected_cluster_manager_' that used by in DetachClusterCommand Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
public static final VotingConfiguration MUST_JOIN_ELECTED_MASTER = new VotingConfiguration( | ||
Collections.singleton("_must_join_elected_master_") | ||
public static final VotingConfiguration MUST_JOIN_ELECTED_CLUSTER_MANAGER = new VotingConfiguration( | ||
Collections.singleton("_must_join_elected_cluster_manager_") |
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.
I assume this name is never used in a distributed manner where 1 node calls it _must_join_elected_cluster_manager_
and the other _must_join_elected_master_
and it's ok?
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.
Hi @dblock , thanks for your review!
In my opinion, the preserved node id _must_join_elected_master_
is only read by ClusterFormationFailureHelper, which result a line of log generated. The log says "master not discovered yet and this node was detached from its previous cluster", so it looks like not used in a distributed manner.
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.
Alright, to make it safe, it's better for me to deprecate MUST_JOIN_ELECTED_MASTER
first in version 2.x, and accepting the both _must_join_elected_cluster_manager_
and _must_join_elected_master_
in ClusterFormationFailureHelper
.
Otherwise, maybe doing a rolling upgrade from 2.x to 3.x after running ./bin/opensearch-node detach-cluster
will be a problem to identify the old identifier _must_join_elected_master_
. Thank you! 😄
Created backport PR #3138 to deprecate |
Description
To support inclusive language, replace "master" with "cluster manager".
MUST_JOIN_ELECTED_MASTER
withMUST_JOIN_ELECTED_CLUSTER_MANAGER
inVotingConfiguration
class_must_join_elected_master_
to_must_join_elected_cluster_manager_
The original
_must_join_elected_master_
is only used as a preserved node id for "Detach Cluster Command" (https://github.com/opensearch-project/OpenSearch/blob/1.3.1/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java#L89)."Detach Cluster Command"
./bin/opensearch-node detach-cluster
can detach a node from its cluster by resetting its cluster UUID. The node can then join another cluster with a different UUID._must_join_elected_master_
is set as a node id and used as an identifier for the node processed by "Detach Cluster Command".Reference: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/node-tool.html#node-tool-detach-cluster
Issues Resolved
A part of #1548 , #1684
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.