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 <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
| 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.
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.
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.
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_MASTERwithMUST_JOIN_ELECTED_CLUSTER_MANAGERinVotingConfigurationclass_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-clustercan 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.