From 9006135f6330c8c146d4623e215234abae985d02 Mon Sep 17 00:00:00 2001
From: Owais Kazi
Date: Thu, 24 Mar 2022 19:50:54 -0700
Subject: [PATCH] Replaced "master" terminology in Log message (#2575)
Changed the log message to cluster-manager from master
Signed-off-by: Owais Kazi
(cherry picked from commit cc0e66b1dcc2cfe17b76bcea1168ebb996fbb090)
---
.../rest/discovery/Zen2RestApiIT.java | 2 +-
.../UnsafeBootstrapAndDetachCommandIT.java | 20 +++---
.../DedicatedClusterSnapshotRestoreIT.java | 20 +++---
.../AddVotingConfigExclusionsRequest.java | 10 +--
.../cluster/InternalClusterInfoService.java | 10 +--
.../coordination/ClusterBootstrapService.java | 4 +-
.../ClusterFormationFailureHelper.java | 14 ++--
.../cluster/coordination/Coordinator.java | 22 ++++---
.../coordination/DetachClusterCommand.java | 4 +-
.../cluster/coordination/JoinHelper.java | 2 +-
.../cluster/coordination/Reconfigurator.java | 4 +-
.../UnsafeBootstrapMasterCommand.java | 10 +--
.../cluster/node/DiscoveryNodeRole.java | 2 +-
.../cluster/node/DiscoveryNodes.java | 4 +-
.../HandshakingTransportAddressConnector.java | 7 +-
.../org/opensearch/discovery/PeerFinder.java | 6 +-
.../opensearch/env/NodeRepurposeCommand.java | 10 +--
.../opensearch/gateway/GatewayMetaState.java | 6 +-
.../IncrementalClusterStateWriter.java | 3 +-
.../gateway/PersistedClusterStateService.java | 2 +-
.../PersistentTasksClusterService.java | 2 +-
.../repositories/blobstore/package-info.java | 2 +-
...AddVotingConfigExclusionsRequestTests.java | 2 +-
...tAddVotingConfigExclusionsActionTests.java | 4 +-
.../ClusterBootstrapServiceTests.java | 2 +-
.../ClusterFormationFailureHelperTests.java | 64 +++++++++----------
.../coordination/CoordinatorTests.java | 8 ++-
.../discovery/AbstractDisruptionTestCase.java | 2 +-
.../AbstractCoordinatorTestCase.java | 2 +-
.../opensearch/test/InternalTestCluster.java | 7 +-
30 files changed, 135 insertions(+), 122 deletions(-)
diff --git a/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/rest/discovery/Zen2RestApiIT.java b/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/rest/discovery/Zen2RestApiIT.java
index 198cc11d824e7..f7899d91e0cb9 100644
--- a/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/rest/discovery/Zen2RestApiIT.java
+++ b/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/rest/discovery/Zen2RestApiIT.java
@@ -176,7 +176,7 @@ public void testFailsOnUnknownNode() throws Exception {
assertThat(e.getResponse().getStatusLine().getStatusCode(), is(400));
assertThat(
e.getMessage(),
- Matchers.containsString("add voting config exclusions request for [invalid] matched no master-eligible nodes")
+ Matchers.containsString("add voting config exclusions request for [invalid] matched no cluster-manager-eligible nodes")
);
}
}
diff --git a/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java
index 1447379b93ec8..292469c6e7b79 100644
--- a/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java
+++ b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java
@@ -287,7 +287,7 @@ public void test3MasterNodes2Failed() throws Exception {
internalCluster().setBootstrapMasterNodeIndex(2);
List masterNodes = new ArrayList<>();
- logger.info("--> start 1st master-eligible node");
+ logger.info("--> start 1st cluster-manager-eligible node");
masterNodes.add(
internalCluster().startMasterOnlyNode(
Settings.builder().put(DiscoverySettings.INITIAL_STATE_TIMEOUT_SETTING.getKey(), "0s").build()
@@ -299,7 +299,7 @@ public void test3MasterNodes2Failed() throws Exception {
Settings.builder().put(DiscoverySettings.INITIAL_STATE_TIMEOUT_SETTING.getKey(), "0s").build()
); // node ordinal 1
- logger.info("--> start 2nd and 3rd master-eligible nodes and bootstrap");
+ logger.info("--> start 2nd and 3rd cluster-manager-eligible nodes and bootstrap");
masterNodes.addAll(internalCluster().startMasterOnlyNodes(2)); // node ordinals 2 and 3
logger.info("--> wait for all nodes to join the cluster");
@@ -335,19 +335,19 @@ public void test3MasterNodes2Failed() throws Exception {
assertTrue(state.blocks().hasGlobalBlockWithId(NoMasterBlockService.NO_MASTER_BLOCK_ID));
});
- logger.info("--> try to unsafely bootstrap 1st master-eligible node, while node lock is held");
+ logger.info("--> try to unsafely bootstrap 1st cluster-manager-eligible node, while node lock is held");
Environment environmentMaster1 = TestEnvironment.newEnvironment(
Settings.builder().put(internalCluster().getDefaultSettings()).put(master1DataPathSettings).build()
);
expectThrows(() -> unsafeBootstrap(environmentMaster1), UnsafeBootstrapMasterCommand.FAILED_TO_OBTAIN_NODE_LOCK_MSG);
- logger.info("--> stop 1st master-eligible node and data-only node");
+ logger.info("--> stop 1st cluster-manager-eligible node and data-only node");
NodeEnvironment nodeEnvironment = internalCluster().getMasterNodeInstance(NodeEnvironment.class);
internalCluster().stopRandomNode(InternalTestCluster.nameFilter(masterNodes.get(0)));
assertBusy(() -> internalCluster().getInstance(GatewayMetaState.class, dataNode).allPendingAsyncStatesWritten());
internalCluster().stopRandomDataNode();
- logger.info("--> unsafely-bootstrap 1st master-eligible node");
+ logger.info("--> unsafely-bootstrap 1st cluster-manager-eligible node");
MockTerminal terminal = unsafeBootstrap(environmentMaster1, false, true);
Metadata metadata = OpenSearchNodeCommand.createPersistedClusterStateService(Settings.EMPTY, nodeEnvironment.nodeDataPaths())
.loadBestOnDiskState().metadata;
@@ -363,7 +363,7 @@ public void test3MasterNodes2Failed() throws Exception {
)
);
- logger.info("--> start 1st master-eligible node");
+ logger.info("--> start 1st cluster-manager-eligible node");
String masterNode2 = internalCluster().startMasterOnlyNode(master1DataPathSettings);
logger.info("--> detach-cluster on data-only node");
@@ -399,7 +399,7 @@ public void test3MasterNodes2Failed() throws Exception {
IndexMetadata indexMetadata = clusterService().state().metadata().index("test");
assertThat(indexMetadata.getSettings().get(IndexMetadata.SETTING_HISTORY_UUID), notNullValue());
- logger.info("--> detach-cluster on 2nd and 3rd master-eligible nodes");
+ logger.info("--> detach-cluster on 2nd and 3rd cluster-manager-eligible nodes");
Environment environmentMaster2 = TestEnvironment.newEnvironment(
Settings.builder().put(internalCluster().getDefaultSettings()).put(master2DataPathSettings).build()
);
@@ -409,7 +409,7 @@ public void test3MasterNodes2Failed() throws Exception {
);
detachCluster(environmentMaster3, false);
- logger.info("--> start 2nd and 3rd master-eligible nodes and ensure 4 nodes stable cluster");
+ logger.info("--> start 2nd and 3rd cluster-manager-eligible nodes and ensure 4 nodes stable cluster");
bootstrappedNodes.add(internalCluster().startMasterOnlyNode(master2DataPathSettings));
bootstrappedNodes.add(internalCluster().startMasterOnlyNode(master3DataPathSettings));
ensureStableCluster(4);
@@ -422,7 +422,7 @@ public void testAllMasterEligibleNodesFailedDanglingIndexImport() throws Excepti
Settings settings = Settings.builder().put(AUTO_IMPORT_DANGLING_INDICES_SETTING.getKey(), true).build();
- logger.info("--> start mixed data and master-eligible node and bootstrap cluster");
+ logger.info("--> start mixed data and cluster-manager-eligible node and bootstrap cluster");
String masterNode = internalCluster().startNode(settings); // node ordinal 0
logger.info("--> start data-only node and ensure 2 nodes stable cluster");
@@ -457,7 +457,7 @@ public void testAllMasterEligibleNodesFailedDanglingIndexImport() throws Excepti
);
detachCluster(environment, false);
- logger.info("--> stop master-eligible node, clear its data and start it again - new cluster should form");
+ logger.info("--> stop cluster-manager-eligible node, clear its data and start it again - new cluster should form");
internalCluster().restartNode(masterNode, new InternalTestCluster.RestartCallback() {
@Override
public boolean clearData(String nodeName) {
diff --git a/server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java
index 47d57e1260b5f..0c392dbe8bbe6 100644
--- a/server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java
+++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java
@@ -482,8 +482,8 @@ public void testSnapshotWithStuckNode() throws Exception {
try {
assertAcked(deleteSnapshotResponseFuture.actionGet());
} catch (SnapshotMissingException ex) {
- // When master node is closed during this test, it sometime manages to delete the snapshot files before
- // completely stopping. In this case the retried delete snapshot operation on the new master can fail
+ // When cluster-manager node is closed during this test, it sometime manages to delete the snapshot files before
+ // completely stopping. In this case the retried delete snapshot operation on the new cluster-manager can fail
// with SnapshotMissingException
}
@@ -759,7 +759,7 @@ public void testRegistrationFailure() {
logger.info("--> start first node");
internalCluster().startNode();
logger.info("--> start second node");
- // Make sure the first node is elected as master
+ // Make sure the first node is elected as cluster-manager
internalCluster().startNode(nonMasterNode());
// Register mock repositories
for (int i = 0; i < 5; i++) {
@@ -836,7 +836,7 @@ public void sendResponse(RestResponse response) {
}
public void testMasterShutdownDuringSnapshot() throws Exception {
- logger.info("--> starting two master nodes and two data nodes");
+ logger.info("--> starting two cluster-manager nodes and two data nodes");
internalCluster().startMasterOnlyNodes(2);
internalCluster().startDataOnlyNodes(2);
@@ -859,7 +859,7 @@ public void testMasterShutdownDuringSnapshot() throws Exception {
.setIndices("test-idx")
.get();
- logger.info("--> stopping master node");
+ logger.info("--> stopping cluster-manager node");
internalCluster().stopCurrentMasterNode();
logger.info("--> wait until the snapshot is done");
@@ -874,7 +874,7 @@ public void testMasterShutdownDuringSnapshot() throws Exception {
}
public void testMasterAndDataShutdownDuringSnapshot() throws Exception {
- logger.info("--> starting three master nodes and two data nodes");
+ logger.info("--> starting three cluster-manager nodes and two data nodes");
internalCluster().startMasterOnlyNodes(3);
internalCluster().startDataOnlyNodes(2);
@@ -902,7 +902,7 @@ public void testMasterAndDataShutdownDuringSnapshot() throws Exception {
logger.info("--> stopping data node {}", dataNode);
stopNode(dataNode);
- logger.info("--> stopping master node {} ", masterNode);
+ logger.info("--> stopping cluster-manager node {} ", masterNode);
internalCluster().stopCurrentMasterNode();
logger.info("--> wait until the snapshot is done");
@@ -925,7 +925,7 @@ public void testMasterAndDataShutdownDuringSnapshot() throws Exception {
* the cluster.
*/
public void testRestoreShrinkIndex() throws Exception {
- logger.info("--> starting a master node and a data node");
+ logger.info("--> starting a cluster-manager node and a data node");
internalCluster().startMasterOnlyNode();
internalCluster().startDataOnlyNode();
@@ -1144,7 +1144,7 @@ public void testDeduplicateIndexMetadata() throws Exception {
}
public void testDataNodeRestartWithBusyMasterDuringSnapshot() throws Exception {
- logger.info("--> starting a master node and two data nodes");
+ logger.info("--> starting a cluster-manager node and two data nodes");
internalCluster().startMasterOnlyNode();
internalCluster().startDataOnlyNodes(2);
final Path repoPath = randomRepoPath();
@@ -1200,7 +1200,7 @@ public void testDataNodeRestartWithBusyMasterDuringSnapshot() throws Exception {
}
public void testDataNodeRestartAfterShardSnapshotFailure() throws Exception {
- logger.info("--> starting a master node and two data nodes");
+ logger.info("--> starting a cluster-manager node and two data nodes");
internalCluster().startMasterOnlyNode();
final List dataNodes = internalCluster().startDataOnlyNodes(2);
final Path repoPath = randomRepoPath();
diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequest.java b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequest.java
index 99291742145f0..e0e5bf622b99e 100644
--- a/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequest.java
+++ b/server/src/main/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequest.java
@@ -54,7 +54,7 @@
import java.util.stream.StreamSupport;
/**
- * A request to add voting config exclusions for certain master-eligible nodes, and wait for these nodes to be removed from the voting
+ * A request to add voting config exclusions for certain cluster-manager-eligible nodes, and wait for these nodes to be removed from the voting
* configuration.
*/
public class AddVotingConfigExclusionsRequest extends MasterNodeRequest {
@@ -66,7 +66,7 @@ public class AddVotingConfigExclusionsRequest extends MasterNodeRequest resolveVotingConfigExclusions(ClusterState currentSta
if (newVotingConfigExclusions.isEmpty()) {
throw new IllegalArgumentException(
- "add voting config exclusions request for " + Arrays.asList(nodeDescriptions) + " matched no master-eligible nodes"
+ "add voting config exclusions request for "
+ + Arrays.asList(nodeDescriptions)
+ + " matched no cluster-manager-eligible nodes"
);
}
} else if (nodeIds.length >= 1) {
diff --git a/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java b/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java
index 05d91fdfd9ebb..5b1c026e5259b 100644
--- a/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java
+++ b/server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java
@@ -77,7 +77,7 @@
* InternalClusterInfoService provides the ClusterInfoService interface,
* routinely updated on a timer. The timer can be dynamically changed by
* setting the cluster.info.update.interval
setting (defaulting
- * to 30 seconds). The InternalClusterInfoService only runs on the master node.
+ * to 30 seconds). The InternalClusterInfoService only runs on the cluster-manager node.
* Listens for changes in the number of data nodes and immediately submits a
* ClusterInfoUpdateJob if a node has been added.
*
@@ -109,7 +109,7 @@ public class InternalClusterInfoService implements ClusterInfoService, ClusterSt
private volatile ImmutableOpenMap leastAvailableSpaceUsages;
private volatile ImmutableOpenMap mostAvailableSpaceUsages;
private volatile IndicesStatsSummary indicesStatsSummary;
- // null if this node is not currently the master
+ // null if this node is not currently the cluster-manager
private final AtomicReference refreshAndRescheduleRunnable = new AtomicReference<>();
private volatile boolean enabled;
private volatile TimeValue fetchTimeout;
@@ -150,8 +150,8 @@ void setUpdateFrequency(TimeValue updateFrequency) {
@Override
public void clusterChanged(ClusterChangedEvent event) {
if (event.localNodeMaster() && refreshAndRescheduleRunnable.get() == null) {
- logger.trace("elected as master, scheduling cluster info update tasks");
- executeRefresh(event.state(), "became master");
+ logger.trace("elected as cluster-manager, scheduling cluster info update tasks");
+ executeRefresh(event.state(), "became cluster-manager");
final RefreshAndRescheduleRunnable newRunnable = new RefreshAndRescheduleRunnable();
refreshAndRescheduleRunnable.set(newRunnable);
@@ -535,7 +535,7 @@ protected void doRun() {
if (this == refreshAndRescheduleRunnable.get()) {
super.doRun();
} else {
- logger.trace("master changed, scheduled refresh job is stale");
+ logger.trace("cluster-manager changed, scheduled refresh job is stale");
}
}
diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java
index ce34a21e4adb6..8df561149eb3d 100644
--- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java
+++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterBootstrapService.java
@@ -135,7 +135,7 @@ public ClusterBootstrapService(
+ DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey()
+ "] set to ["
+ DiscoveryModule.SINGLE_NODE_DISCOVERY_TYPE
- + "] must be master-eligible"
+ + "] must be cluster-manager-eligible"
);
}
bootstrapRequirements = Collections.singleton(Node.NODE_NAME_SETTING.get(settings));
@@ -219,7 +219,7 @@ void scheduleUnconfiguredBootstrap() {
logger.info(
"no discovery configuration found, will perform best-effort cluster bootstrapping after [{}] "
- + "unless existing master is discovered",
+ + "unless existing cluster-manager is discovered",
unconfiguredBootstrapTimeout
);
diff --git a/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java b/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java
index c36a2983a011a..0f419aa7a0937 100644
--- a/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java
+++ b/server/src/main/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelper.java
@@ -192,7 +192,7 @@ String getDescription() {
);
if (clusterState.nodes().getLocalNode().isMasterNode() == false) {
- return String.format(Locale.ROOT, "master not discovered yet: %s", discoveryStateIgnoringQuorum);
+ return String.format(Locale.ROOT, "cluster-manager not discovered yet: %s", discoveryStateIgnoringQuorum);
}
if (clusterState.getLastAcceptedConfiguration().isEmpty()) {
@@ -203,14 +203,14 @@ String getDescription() {
} else {
bootstrappingDescription = String.format(
Locale.ROOT,
- "this node must discover master-eligible nodes %s to bootstrap a cluster",
+ "this node must discover cluster-manager-eligible nodes %s to bootstrap a cluster",
INITIAL_CLUSTER_MANAGER_NODES_SETTING.get(settings)
);
}
return String.format(
Locale.ROOT,
- "master not discovered yet, this node has not previously joined a bootstrapped cluster, and %s: %s",
+ "cluster-manager not discovered yet, this node has not previously joined a bootstrapped cluster, and %s: %s",
bootstrappingDescription,
discoveryStateIgnoringQuorum
);
@@ -221,7 +221,7 @@ String getDescription() {
if (clusterState.getLastCommittedConfiguration().equals(VotingConfiguration.MUST_JOIN_ELECTED_MASTER)) {
return String.format(
Locale.ROOT,
- "master not discovered yet and this node was detached from its previous cluster, have discovered %s; %s",
+ "cluster-manager not discovered yet and this node was detached from its previous cluster, have discovered %s; %s",
foundPeers,
discoveryWillContinueDescription
);
@@ -250,7 +250,7 @@ String getDescription() {
return String.format(
Locale.ROOT,
- "master not discovered or elected yet, an election requires %s, have discovered %s which %s; %s",
+ "cluster-manager not discovered or elected yet, an election requires %s, have discovered %s which %s; %s",
quorumDescription,
foundPeers,
isQuorumOrNot,
@@ -269,8 +269,8 @@ private String describeQuorum(VotingConfiguration votingConfiguration) {
if (nodeIds.size() == 1) {
if (nodeIds.contains(GatewayMetaState.STALE_STATE_CONFIG_NODE_ID)) {
- return "one or more nodes that have already participated as master-eligible nodes in the cluster but this node was "
- + "not master-eligible the last time it joined the cluster";
+ return "one or more nodes that have already participated as cluster-manager-eligible nodes in the cluster but this node was "
+ + "not cluster-manager-eligible the last time it joined the cluster";
} else {
return "a node with id " + realNodeIds;
}
diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java b/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java
index 557f11f75d969..89e5b9b4cfbcc 100644
--- a/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java
+++ b/server/src/main/java/org/opensearch/cluster/coordination/Coordinator.java
@@ -510,7 +510,7 @@ private void startElection() {
private void abdicateTo(DiscoveryNode newMaster) {
assert Thread.holdsLock(mutex);
assert mode == Mode.LEADER : "expected to be leader on abdication but was " + mode;
- assert newMaster.isMasterNode() : "should only abdicate to master-eligible node but was " + newMaster;
+ assert newMaster.isMasterNode() : "should only abdicate to cluster-manager-eligible node but was " + newMaster;
final StartJoinRequest startJoinRequest = new StartJoinRequest(newMaster, Math.max(getCurrentTerm(), maxTermSeen) + 1);
logger.info("abdicating to {} with term {}", newMaster, startJoinRequest.getTerm());
getLastAcceptedState().nodes().mastersFirstStream().forEach(node -> {
@@ -563,7 +563,7 @@ private Join joinLeaderInTerm(StartJoinRequest startJoinRequest) {
private void handleJoinRequest(JoinRequest joinRequest, JoinHelper.JoinCallback joinCallback) {
assert Thread.holdsLock(mutex) == false;
- assert getLocalNode().isMasterNode() : getLocalNode() + " received a join but is not master-eligible";
+ assert getLocalNode().isMasterNode() : getLocalNode() + " received a join but is not cluster-manager-eligible";
logger.trace("handleJoinRequest: as {}, handling {}", mode, joinRequest);
if (singleNodeDiscovery && joinRequest.getSourceNode().equals(getLocalNode()) == false) {
@@ -683,7 +683,7 @@ void becomeCandidate(String method) {
void becomeLeader(String method) {
assert Thread.holdsLock(mutex) : "Coordinator mutex not held";
assert mode == Mode.CANDIDATE : "expected candidate but was " + mode;
- assert getLocalNode().isMasterNode() : getLocalNode() + " became a leader but is not master-eligible";
+ assert getLocalNode().isMasterNode() : getLocalNode() + " became a leader but is not cluster-manager-eligible";
logger.debug(
"{}: coordinator becoming LEADER in term {} (was {}, lastKnownLeader was [{}])",
@@ -709,7 +709,7 @@ void becomeLeader(String method) {
void becomeFollower(String method, DiscoveryNode leaderNode) {
assert Thread.holdsLock(mutex) : "Coordinator mutex not held";
- assert leaderNode.isMasterNode() : leaderNode + " became a leader but is not master-eligible";
+ assert leaderNode.isMasterNode() : leaderNode + " became a leader but is not cluster-manager-eligible";
assert mode != Mode.LEADER : "do not switch to follower from leader (should be candidate first)";
if (mode == Mode.FOLLOWER && Optional.of(leaderNode).equals(lastKnownLeader)) {
@@ -751,11 +751,11 @@ void becomeFollower(String method, DiscoveryNode leaderNode) {
}
private void cleanMasterService() {
- masterService.submitStateUpdateTask("clean-up after stepping down as master", new LocalClusterUpdateTask() {
+ masterService.submitStateUpdateTask("clean-up after stepping down as cluster-manager", new LocalClusterUpdateTask() {
@Override
public void onFailure(String source, Exception e) {
// ignore
- logger.trace("failed to clean-up after stepping down as master", e);
+ logger.trace("failed to clean-up after stepping down as cluster-manager", e);
}
@Override
@@ -987,9 +987,9 @@ public boolean setInitialConfiguration(final VotingConfiguration votingConfigura
}
if (getLocalNode().isMasterNode() == false) {
- logger.debug("skip setting initial configuration as local node is not a master-eligible node");
+ logger.debug("skip setting initial configuration as local node is not a cluster-manager-eligible node");
throw new CoordinationStateRejectedException(
- "this node is not master-eligible, but cluster bootstrapping can only happen on a master-eligible node"
+ "this node is not cluster-manager-eligible, but cluster bootstrapping can only happen on a cluster-manager-eligible node"
);
}
@@ -1046,8 +1046,10 @@ ClusterState improveConfiguration(ClusterState clusterState) {
// exclude any nodes whose ID is in the voting config exclusions list ...
final Stream excludedNodeIds = clusterState.getVotingConfigExclusions().stream().map(VotingConfigExclusion::getNodeId);
- // ... and also automatically exclude the node IDs of master-ineligible nodes that were previously master-eligible and are still in
- // the voting config. We could exclude all the master-ineligible nodes here, but there could be quite a few of them and that makes
+ // ... and also automatically exclude the node IDs of cluster-manager-ineligible nodes that were previously cluster-manager-eligible
+ // and are still in
+ // the voting config. We could exclude all the cluster-manager-ineligible nodes here, but there could be quite a few of them and
+ // that makes
// the logging much harder to follow.
final Stream masterIneligibleNodeIdsInVotingConfig = StreamSupport.stream(clusterState.nodes().spliterator(), false)
.filter(
diff --git a/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java
index 49d88fd33c724..efa5a5ee600ab 100644
--- a/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java
+++ b/server/src/main/java/org/opensearch/cluster/coordination/DetachClusterCommand.java
@@ -47,9 +47,9 @@ public class DetachClusterCommand extends OpenSearchNodeCommand {
static final String CONFIRMATION_MSG = DELIMITER
+ "\n"
+ "You should only run this tool if you have permanently lost all of the\n"
- + "master-eligible nodes in this cluster and you cannot restore the cluster\n"
+ + "cluster-manager-eligible nodes in this cluster and you cannot restore the cluster\n"
+ "from a snapshot, or you have already unsafely bootstrapped a new cluster\n"
- + "by running `opensearch-node unsafe-bootstrap` on a master-eligible\n"
+ + "by running `opensearch-node unsafe-bootstrap` on a cluster-manager-eligible\n"
+ "node that belonged to the same cluster as this node. This tool can cause\n"
+ "arbitrary data loss and its use should be your last resort.\n"
+ "\n"
diff --git a/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java b/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java
index 6d2fb99e04f86..5975e5b64214f 100644
--- a/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java
+++ b/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java
@@ -489,7 +489,7 @@ public void close(Mode newMode) {
pendingAsTasks.put(task, new JoinTaskListener(task, value));
});
- final String stateUpdateSource = "elected-as-master ([" + pendingAsTasks.size() + "] nodes joined)";
+ final String stateUpdateSource = "elected-as-cluster-manager ([" + pendingAsTasks.size() + "] nodes joined)";
pendingAsTasks.put(JoinTaskExecutor.newBecomeMasterTask(), (source, e) -> {});
pendingAsTasks.put(JoinTaskExecutor.newFinishElectionTask(), (source, e) -> {});
diff --git a/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java b/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java
index 26f289f5547d6..b38b0cf0f4693 100644
--- a/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java
+++ b/server/src/main/java/org/opensearch/cluster/coordination/Reconfigurator.java
@@ -57,14 +57,14 @@ public class Reconfigurator {
* the best resilience it makes automatic adjustments to the voting configuration as master nodes join or leave the cluster. Adjustments
* that fix or increase the size of the voting configuration are always a good idea, but the wisdom of reducing the voting configuration
* size is less clear. For instance, automatically reducing the voting configuration down to a single node means the cluster requires
- * this node to operate, which is not resilient: if it broke we could restore every other master-eligible node in the cluster to health
+ * this node to operate, which is not resilient: if it broke we could restore every other cluster-manager-eligible node in the cluster to health
* and still the cluster would be unavailable. However not reducing the voting configuration size can also hamper resilience: in a
* five-node cluster we could lose two nodes and by reducing the voting configuration to the remaining three nodes we could tolerate the
* loss of a further node before failing.
*
* We offer two options: either we auto-shrink the voting configuration as long as it contains more than three nodes, or we don't and we
* require the user to control the voting configuration manually using the retirement API. The former, default, option, guarantees that
- * as long as there have been at least three master-eligible nodes in the cluster and no more than one of them is currently unavailable,
+ * as long as there have been at least three cluster-manager-eligible nodes in the cluster and no more than one of them is currently unavailable,
* then the cluster will still operate, which is what almost everyone wants. Manual control is for users who want different guarantees.
*/
public static final Setting CLUSTER_AUTO_SHRINK_VOTING_CONFIGURATION = Setting.boolSetting(
diff --git a/server/src/main/java/org/opensearch/cluster/coordination/UnsafeBootstrapMasterCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/UnsafeBootstrapMasterCommand.java
index e61b6448f6ac9..c6c7e75497e29 100644
--- a/server/src/main/java/org/opensearch/cluster/coordination/UnsafeBootstrapMasterCommand.java
+++ b/server/src/main/java/org/opensearch/cluster/coordination/UnsafeBootstrapMasterCommand.java
@@ -60,15 +60,15 @@ public class UnsafeBootstrapMasterCommand extends OpenSearchNodeCommand {
static final String CONFIRMATION_MSG = DELIMITER
+ "\n"
+ "You should only run this tool if you have permanently lost half or more\n"
- + "of the master-eligible nodes in this cluster, and you cannot restore the\n"
+ + "of the cluster-manager-eligible nodes in this cluster, and you cannot restore the\n"
+ "cluster from a snapshot. This tool can cause arbitrary data loss and its\n"
- + "use should be your last resort. If you have multiple surviving master\n"
+ + "use should be your last resort. If you have multiple surviving cluster-manager\n"
+ "eligible nodes, you should run this tool on the node with the highest\n"
+ "cluster state (term, version) pair.\n"
+ "\n"
+ "Do you want to proceed?\n";
- static final String NOT_MASTER_NODE_MSG = "unsafe-bootstrap tool can only be run on master eligible node";
+ static final String NOT_MASTER_NODE_MSG = "unsafe-bootstrap tool can only be run on cluster-manager eligible node";
static final String EMPTY_LAST_COMMITTED_VOTING_CONFIG_MSG =
"last committed voting voting configuration is empty, cluster has never been bootstrapped?";
@@ -81,7 +81,9 @@ public class UnsafeBootstrapMasterCommand extends OpenSearchNodeCommand {
private OptionSpec applyClusterReadOnlyBlockOption;
UnsafeBootstrapMasterCommand() {
- super("Forces the successful election of the current node after the permanent loss of the half or more master-eligible nodes");
+ super(
+ "Forces the successful election of the current node after the permanent loss of the half or more cluster-manager-eligible nodes"
+ );
applyClusterReadOnlyBlockOption = parser.accepts("apply-cluster-read-only-block", "Optional cluster.blocks.read_only setting")
.withOptionalArg()
.ofType(Boolean.class);
diff --git a/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeRole.java b/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeRole.java
index cff1a77f4cdb7..83e35c0ee18ab 100644
--- a/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeRole.java
+++ b/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeRole.java
@@ -206,7 +206,7 @@ public Setting legacySetting() {
};
/**
- * Represents the role for a master-eligible node.
+ * Represents the role for a cluster-manager-eligible node.
* @deprecated As of 2.0, because promoting inclusive language, replaced by {@link #CLUSTER_MANAGER_ROLE}
*/
@Deprecated
diff --git a/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java b/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java
index 1097f3bc245ac..8d84869bc8bec 100644
--- a/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java
+++ b/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java
@@ -574,7 +574,7 @@ public List addedNodes() {
public String shortSummary() {
final StringBuilder summary = new StringBuilder();
if (masterNodeChanged()) {
- summary.append("master node changed {previous [");
+ summary.append("cluster-manager node changed {previous [");
if (previousMasterNode() != null) {
summary.append(previousMasterNode());
}
@@ -799,7 +799,7 @@ public boolean isLocalNodeElectedMaster() {
}
/**
- * Check if the given name of the node role is 'cluster_manger' or 'master'.
+ * Check if the given name of the node role is 'cluster_manager' or 'master'.
* The method is added for {@link #resolveNodes} to keep the code clear, when support the both above roles.
* @deprecated As of 2.0, because promoting inclusive language. MASTER_ROLE is deprecated.
* @param matchAttrName a given String for a name of the node role.
diff --git a/server/src/main/java/org/opensearch/discovery/HandshakingTransportAddressConnector.java b/server/src/main/java/org/opensearch/discovery/HandshakingTransportAddressConnector.java
index 906e28cbb6b51..d2e2c5fbea8ac 100644
--- a/server/src/main/java/org/opensearch/discovery/HandshakingTransportAddressConnector.java
+++ b/server/src/main/java/org/opensearch/discovery/HandshakingTransportAddressConnector.java
@@ -137,7 +137,9 @@ protected void innerOnResponse(DiscoveryNode remoteNode) {
if (remoteNode.equals(transportService.getLocalNode())) {
listener.onFailure(new ConnectTransportException(remoteNode, "local node found"));
} else if (remoteNode.isMasterNode() == false) {
- listener.onFailure(new ConnectTransportException(remoteNode, "non-master-eligible node found"));
+ listener.onFailure(
+ new ConnectTransportException(remoteNode, "non-cluster-manager-eligible node found")
+ );
} else {
transportService.connectToNode(remoteNode, new ActionListener() {
@Override
@@ -153,7 +155,8 @@ public void onResponse(Void ignored) {
@Override
public void onFailure(Exception e) {
// we opened a connection and successfully performed a handshake, so we're definitely
- // talking to a master-eligible node with a matching cluster name and a good version,
+ // talking to a cluster-manager-eligible node with a matching cluster name and a good
+ // version,
// but the attempt to open a full connection to its publish address failed; a common
// reason is that the remote node is listening on 0.0.0.0 but has made an inappropriate
// choice for its publish address.
diff --git a/server/src/main/java/org/opensearch/discovery/PeerFinder.java b/server/src/main/java/org/opensearch/discovery/PeerFinder.java
index 37f07c5d56a9a..fe669e7b6d073 100644
--- a/server/src/main/java/org/opensearch/discovery/PeerFinder.java
+++ b/server/src/main/java/org/opensearch/discovery/PeerFinder.java
@@ -225,7 +225,7 @@ public List getLastResolvedAddresses() {
public interface TransportAddressConnector {
/**
- * Identify the node at the given address and, if it is a master node and not the local node then establish a full connection to it.
+ * Identify the node at the given address and, if it is a cluster-manager node and not the local node then establish a full connection to it.
*/
void connectToRemoteMasterNode(TransportAddress transportAddress, ActionListener listener);
}
@@ -275,7 +275,7 @@ private boolean handleWakeUp() {
return peersRemoved;
}
- logger.trace("probing master nodes from cluster state: {}", lastAcceptedNodes);
+ logger.trace("probing cluster-manager nodes from cluster state: {}", lastAcceptedNodes);
for (ObjectCursor discoveryNodeObjectCursor : lastAcceptedNodes.getMasterNodes().values()) {
startProbe(discoveryNodeObjectCursor.value.getAddress());
}
@@ -381,7 +381,7 @@ void establishConnection() {
transportAddressConnector.connectToRemoteMasterNode(transportAddress, new ActionListener() {
@Override
public void onResponse(DiscoveryNode remoteNode) {
- assert remoteNode.isMasterNode() : remoteNode + " is not master-eligible";
+ assert remoteNode.isMasterNode() : remoteNode + " is not cluster-manager-eligible";
assert remoteNode.equals(getLocalNode()) == false : remoteNode + " is the local node";
synchronized (mutex) {
if (active == false) {
diff --git a/server/src/main/java/org/opensearch/env/NodeRepurposeCommand.java b/server/src/main/java/org/opensearch/env/NodeRepurposeCommand.java
index d14b7df8b747a..cb431a6a5d0de 100644
--- a/server/src/main/java/org/opensearch/env/NodeRepurposeCommand.java
+++ b/server/src/main/java/org/opensearch/env/NodeRepurposeCommand.java
@@ -68,7 +68,7 @@ public class NodeRepurposeCommand extends OpenSearchNodeCommand {
static final String NO_SHARD_DATA_TO_CLEAN_UP_FOUND = "No shard data to clean-up found";
public NodeRepurposeCommand() {
- super("Repurpose this node to another master/data role, cleaning up any excess persisted data");
+ super("Repurpose this node to another cluster-manager/data role, cleaning up any excess persisted data");
}
void testExecute(Terminal terminal, OptionSet options, Environment env) throws Exception {
@@ -129,7 +129,7 @@ private void processNoMasterNoDataNode(Terminal terminal, Path[] dataPaths, Envi
terminal.println(noMasterMessage(indexUUIDs.size(), shardDataPaths.size(), indexMetadataPaths.size()));
outputHowToSeeVerboseInformation(terminal);
- terminal.println("Node is being re-purposed as no-master and no-data. Clean-up of index data will be performed.");
+ terminal.println("Node is being re-purposed as no-cluster-manager and no-data. Clean-up of index data will be performed.");
confirm(terminal, "Do you want to proceed?");
removePaths(terminal, indexPaths); // clean-up shard dirs
@@ -137,7 +137,7 @@ private void processNoMasterNoDataNode(Terminal terminal, Path[] dataPaths, Envi
MetadataStateFormat.deleteMetaState(dataPaths);
IOUtils.rm(Stream.of(dataPaths).map(path -> path.resolve(INDICES_FOLDER)).toArray(Path[]::new));
- terminal.println("Node successfully repurposed to no-master and no-data.");
+ terminal.println("Node successfully repurposed to no-cluster-manager and no-data.");
}
private void processMasterNoDataNode(Terminal terminal, Path[] dataPaths, Environment env) throws IOException {
@@ -162,12 +162,12 @@ private void processMasterNoDataNode(Terminal terminal, Path[] dataPaths, Enviro
terminal.println(shardMessage(shardDataPaths.size(), indexUUIDs.size()));
outputHowToSeeVerboseInformation(terminal);
- terminal.println("Node is being re-purposed as master and no-data. Clean-up of shard data will be performed.");
+ terminal.println("Node is being re-purposed as cluster-manager and no-data. Clean-up of shard data will be performed.");
confirm(terminal, "Do you want to proceed?");
removePaths(terminal, shardDataPaths); // clean-up shard dirs
- terminal.println("Node successfully repurposed to master and no-data.");
+ terminal.println("Node successfully repurposed to cluster-manager and no-data.");
}
private ClusterState loadClusterState(Terminal terminal, Environment env, PersistedClusterStateService psf) throws IOException {
diff --git a/server/src/main/java/org/opensearch/gateway/GatewayMetaState.java b/server/src/main/java/org/opensearch/gateway/GatewayMetaState.java
index fd978a9c8ed8b..3081c4da8f7a7 100644
--- a/server/src/main/java/org/opensearch/gateway/GatewayMetaState.java
+++ b/server/src/main/java/org/opensearch/gateway/GatewayMetaState.java
@@ -89,7 +89,7 @@
*
* When started, ensures that this version is compatible with the state stored on disk, and performs a state upgrade if necessary. Note that
* the state being loaded when constructing the instance of this class is not necessarily the state that will be used as {@link
- * ClusterState#metadata()} because it might be stale or incomplete. Master-eligible nodes must perform an election to find a complete and
+ * ClusterState#metadata()} because it might be stale or incomplete. Cluster-manager-eligible nodes must perform an election to find a complete and
* non-stale state, and master-ineligible nodes receive the real cluster state from the elected master after joining the cluster.
*/
public class GatewayMetaState implements Closeable {
@@ -97,7 +97,7 @@ public class GatewayMetaState implements Closeable {
/**
* Fake node ID for a voting configuration written by a master-ineligible data node to indicate that its on-disk state is potentially
* stale (since it is written asynchronously after application, rather than before acceptance). This node ID means that if the node is
- * restarted as a master-eligible node then it does not win any elections until it has received a fresh cluster state.
+ * restarted as a cluster-manager-eligible node then it does not win any elections until it has received a fresh cluster state.
*/
public static final String STALE_STATE_CONFIG_NODE_ID = "STALE_STATE_CONFIG";
@@ -310,7 +310,7 @@ public void applyClusterState(ClusterChangedEvent event) {
}
try {
- // Hack: This is to ensure that non-master-eligible Zen2 nodes always store a current term
+ // Hack: This is to ensure that non-cluster-manager-eligible Zen2 nodes always store a current term
// that's higher than the last accepted term.
// TODO: can we get rid of this hack?
if (event.state().term() > incrementalClusterStateWriter.getPreviousManifest().getCurrentTerm()) {
diff --git a/server/src/main/java/org/opensearch/gateway/IncrementalClusterStateWriter.java b/server/src/main/java/org/opensearch/gateway/IncrementalClusterStateWriter.java
index 4c1a921e9c4ac..4933b70384960 100644
--- a/server/src/main/java/org/opensearch/gateway/IncrementalClusterStateWriter.java
+++ b/server/src/main/java/org/opensearch/gateway/IncrementalClusterStateWriter.java
@@ -333,7 +333,8 @@ void writeManifestAndCleanup(String reason, Manifest manifest) throws WriteState
} catch (WriteStateException e) {
// If the Manifest write results in a dirty WriteStateException it's not safe to roll back, removing the new metadata files,
// because if the Manifest was actually written to disk and its deletion fails it will reference these new metadata files.
- // On master-eligible nodes a dirty WriteStateException here is fatal to the node since we no longer really have any idea
+ // On cluster-manager-eligible nodes a dirty WriteStateException here is fatal to the node since we no longer really have
+ // any idea
// what the state on disk is and the only sensible response is to start again from scratch.
if (e.isDirty() == false) {
rollback();
diff --git a/server/src/main/java/org/opensearch/gateway/PersistedClusterStateService.java b/server/src/main/java/org/opensearch/gateway/PersistedClusterStateService.java
index 8ccf6375239a2..4bcd6bb9fc7a5 100644
--- a/server/src/main/java/org/opensearch/gateway/PersistedClusterStateService.java
+++ b/server/src/main/java/org/opensearch/gateway/PersistedClusterStateService.java
@@ -108,7 +108,7 @@
import java.util.function.Supplier;
/**
- * Stores cluster metadata in a bare Lucene index (per data path) split across a number of documents. This is used by master-eligible nodes
+ * Stores cluster metadata in a bare Lucene index (per data path) split across a number of documents. This is used by cluster-manager-eligible nodes
* to record the last-accepted cluster state during publication. The metadata is written incrementally where possible, leaving alone any
* documents that have not changed. The index has the following fields:
*
diff --git a/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java
index 00a5f335338c4..eaa623b53ac1c 100644
--- a/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java
+++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java
@@ -398,7 +398,7 @@ public void clusterStateProcessed(String source, ClusterState oldState, ClusterS
/**
* Returns true if the cluster state change(s) require to reassign some persistent tasks. It can happen in the following
- * situations: a node left or is added, the routing table changed, the master node changed, the metadata changed or the
+ * situations: a node left or is added, the routing table changed, the cluster-manager node changed, the metadata changed or the
* persistent tasks changed.
*/
boolean shouldReassignPersistentTasks(final ClusterChangedEvent event) {
diff --git a/server/src/main/java/org/opensearch/repositories/blobstore/package-info.java b/server/src/main/java/org/opensearch/repositories/blobstore/package-info.java
index 92ae4b69c45bc..a960cfe70aee7 100644
--- a/server/src/main/java/org/opensearch/repositories/blobstore/package-info.java
+++ b/server/src/main/java/org/opensearch/repositories/blobstore/package-info.java
@@ -38,7 +38,7 @@
* any {@code BlobStoreRepository} implementation must provide via its implementation of
* {@link org.opensearch.repositories.blobstore.BlobStoreRepository#getBlobContainer()}.
*
- * The blob store is written to and read from by master-eligible nodes and data nodes. All metadata related to a snapshot's
+ *
The blob store is written to and read from by cluster-manager-eligible nodes and data nodes. All metadata related to a snapshot's
* scope and health is written by the master node.
* The data-nodes on the other hand, write the data for each individual shard but do not write any blobs outside of shard directories for
* shards that they hold the primary of. For each shard, the data-node holding the shard's primary writes the actual data in form of
diff --git a/server/src/test/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequestTests.java b/server/src/test/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequestTests.java
index 8da65ba13b9cb..a92e4e4a6c536 100644
--- a/server/src/test/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequestTests.java
+++ b/server/src/test/java/org/opensearch/action/admin/cluster/configuration/AddVotingConfigExclusionsRequestTests.java
@@ -163,7 +163,7 @@ public void testResolve() {
IllegalArgumentException.class,
() -> makeRequestWithNodeDescriptions("not-a-node").resolveVotingConfigExclusions(clusterState)
).getMessage(),
- equalTo("add voting config exclusions request for [not-a-node] matched no master-eligible nodes")
+ equalTo("add voting config exclusions request for [not-a-node] matched no cluster-manager-eligible nodes")
);
assertWarnings(AddVotingConfigExclusionsRequest.DEPRECATION_MESSAGE);
}
diff --git a/server/src/test/java/org/opensearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsActionTests.java b/server/src/test/java/org/opensearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsActionTests.java
index a570db040a805..bff0689a153b3 100644
--- a/server/src/test/java/org/opensearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsActionTests.java
+++ b/server/src/test/java/org/opensearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsActionTests.java
@@ -344,7 +344,7 @@ public void testReturnsErrorIfNoMatchingNodeDescriptions() throws InterruptedExc
assertThat(rootCause, instanceOf(IllegalArgumentException.class));
assertThat(
rootCause.getMessage(),
- equalTo("add voting config exclusions request for [not-a-node] matched no master-eligible nodes")
+ equalTo("add voting config exclusions request for [not-a-node] matched no cluster-manager-eligible nodes")
);
assertWarnings(AddVotingConfigExclusionsRequest.DEPRECATION_MESSAGE);
}
@@ -368,7 +368,7 @@ public void testOnlyMatchesMasterEligibleNodes() throws InterruptedException {
assertThat(rootCause, instanceOf(IllegalArgumentException.class));
assertThat(
rootCause.getMessage(),
- equalTo("add voting config exclusions request for [_all, master:false] matched no master-eligible nodes")
+ equalTo("add voting config exclusions request for [_all, master:false] matched no cluster-manager-eligible nodes")
);
assertWarnings(AddVotingConfigExclusionsRequest.DEPRECATION_MESSAGE);
}
diff --git a/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceTests.java b/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceTests.java
index 079b31f31f599..dd55d078fe2c6 100644
--- a/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceTests.java
+++ b/server/src/test/java/org/opensearch/cluster/coordination/ClusterBootstrapServiceTests.java
@@ -705,7 +705,7 @@ public void testFailBootstrapNonMasterEligibleNodeWithSingleNodeDiscovery() {
IllegalArgumentException.class,
() -> new ClusterBootstrapService(settings.build(), transportService, () -> emptyList(), () -> false, vc -> fail())
).getMessage(),
- containsString("node with [discovery.type] set to [single-node] must be master-eligible")
+ containsString("node with [discovery.type] set to [single-node] must be cluster-manager-eligible")
);
}
}
diff --git a/server/src/test/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelperTests.java b/server/src/test/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelperTests.java
index 13cdc640008cb..391d7b0e56332 100644
--- a/server/src/test/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelperTests.java
+++ b/server/src/test/java/org/opensearch/cluster/coordination/ClusterFormationFailureHelperTests.java
@@ -191,7 +191,7 @@ public void testDescriptionOnMasterIneligibleNodes() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet: have discovered []; discovery will continue using [] from hosts providers "
+ "cluster-manager not discovered yet: have discovered []; discovery will continue using [] from hosts providers "
+ "and [] from last-known cluster state; node term 15, last-accepted version 12 in term 4"
)
);
@@ -208,7 +208,7 @@ public void testDescriptionOnMasterIneligibleNodes() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet: have discovered []; discovery will continue using ["
+ "cluster-manager not discovered yet: have discovered []; discovery will continue using ["
+ otherAddress
+ "] from hosts providers and [] from last-known cluster state; node term 16, last-accepted version 12 in term 4"
)
@@ -226,7 +226,7 @@ public void testDescriptionOnMasterIneligibleNodes() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet: have discovered ["
+ "cluster-manager not discovered yet: have discovered ["
+ otherNode
+ "]; discovery will continue using [] from hosts providers "
+ "and [] from last-known cluster state; node term 17, last-accepted version 12 in term 4"
@@ -257,7 +257,7 @@ public void testDescriptionForBWCState() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet: have discovered []; discovery will continue using [] from hosts providers "
+ "cluster-manager not discovered yet: have discovered []; discovery will continue using [] from hosts providers "
+ "and [] from last-known cluster state; node term 15, last-accepted version 42 in term 0"
)
);
@@ -328,7 +328,7 @@ public void testDescriptionBeforeBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet, this node has not previously joined a bootstrapped cluster, and "
+ "cluster-manager not discovered yet, this node has not previously joined a bootstrapped cluster, and "
+ "[cluster.initial_cluster_manager_nodes] is empty on this node: have discovered []; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -348,7 +348,7 @@ public void testDescriptionBeforeBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet, this node has not previously joined a bootstrapped cluster, and "
+ "cluster-manager not discovered yet, this node has not previously joined a bootstrapped cluster, and "
+ "[cluster.initial_cluster_manager_nodes] is empty on this node: have discovered []; "
+ "discovery will continue using ["
+ otherAddress
@@ -370,7 +370,7 @@ public void testDescriptionBeforeBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet, this node has not previously joined a bootstrapped cluster, and "
+ "cluster-manager not discovered yet, this node has not previously joined a bootstrapped cluster, and "
+ "[cluster.initial_cluster_manager_nodes] is empty on this node: have discovered ["
+ otherNode
+ "]; "
@@ -391,8 +391,8 @@ public void testDescriptionBeforeBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet, this node has not previously joined a bootstrapped cluster, and "
- + "this node must discover master-eligible nodes [other] to bootstrap a cluster: have discovered []; "
+ "cluster-manager not discovered yet, this node has not previously joined a bootstrapped cluster, and "
+ + "this node must discover cluster-manager-eligible nodes [other] to bootstrap a cluster: have discovered []; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
+ "] from last-known cluster state; node term 4, last-accepted version 7 in term 4"
@@ -442,7 +442,7 @@ public void testDescriptionAfterDetachCluster() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet and this node was detached from its previous cluster, "
+ "cluster-manager not discovered yet and this node was detached from its previous cluster, "
+ "have discovered []; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -462,7 +462,7 @@ public void testDescriptionAfterDetachCluster() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet and this node was detached from its previous cluster, "
+ "cluster-manager not discovered yet and this node was detached from its previous cluster, "
+ "have discovered []; "
+ "discovery will continue using ["
+ otherAddress
@@ -484,7 +484,7 @@ public void testDescriptionAfterDetachCluster() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet and this node was detached from its previous cluster, "
+ "cluster-manager not discovered yet and this node was detached from its previous cluster, "
+ "have discovered ["
+ otherNode
+ "]; "
@@ -506,7 +506,7 @@ public void testDescriptionAfterDetachCluster() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered yet and this node was detached from its previous cluster, "
+ "cluster-manager not discovered yet and this node was detached from its previous cluster, "
+ "have discovered ["
+ yetAnotherNode
+ "]; "
@@ -534,7 +534,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires a node with id [otherNode], "
+ "cluster-manager not discovered or elected yet, an election requires a node with id [otherNode], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -554,7 +554,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires a node with id [otherNode], "
+ "cluster-manager not discovered or elected yet, an election requires a node with id [otherNode], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using ["
+ otherAddress
@@ -576,7 +576,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires a node with id [otherNode], "
+ "cluster-manager not discovered or elected yet, an election requires a node with id [otherNode], "
+ "have discovered ["
+ otherNode
+ "] which is a quorum; "
@@ -598,7 +598,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires a node with id [otherNode], "
+ "cluster-manager not discovered or elected yet, an election requires a node with id [otherNode], "
+ "have discovered ["
+ yetAnotherNode
+ "] which is not a quorum; "
@@ -619,7 +619,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires two nodes with ids [n1, n2], "
+ "cluster-manager not discovered or elected yet, an election requires two nodes with ids [n1, n2], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -638,7 +638,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires at least 2 nodes with ids from [n1, n2, n3], "
+ "cluster-manager not discovered or elected yet, an election requires at least 2 nodes with ids from [n1, n2, n3], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -657,7 +657,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires 2 nodes with ids [n1, n2], "
+ "cluster-manager not discovered or elected yet, an election requires 2 nodes with ids [n1, n2], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -676,7 +676,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires at least 3 nodes with ids from [n1, n2, n3, n4], "
+ "cluster-manager not discovered or elected yet, an election requires at least 3 nodes with ids from [n1, n2, n3, n4], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -695,7 +695,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires at least 3 nodes with ids from [n1, n2, n3, n4, n5], "
+ "cluster-manager not discovered or elected yet, an election requires at least 3 nodes with ids from [n1, n2, n3, n4, n5], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -714,7 +714,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires at least 3 nodes with ids from [n1, n2, n3, n4], "
+ "cluster-manager not discovered or elected yet, an election requires at least 3 nodes with ids from [n1, n2, n3, n4], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -733,7 +733,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires 3 nodes with ids [n1, n2, n3], "
+ "cluster-manager not discovered or elected yet, an election requires 3 nodes with ids [n1, n2, n3], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -752,7 +752,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires a node with id [n1], "
+ "cluster-manager not discovered or elected yet, an election requires a node with id [n1], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -771,7 +771,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires a node with id [n1] and a node with id [n2], "
+ "cluster-manager not discovered or elected yet, an election requires a node with id [n1] and a node with id [n2], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -790,7 +790,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires a node with id [n1] and two nodes with ids [n2, n3], "
+ "cluster-manager not discovered or elected yet, an election requires a node with id [n1] and two nodes with ids [n2, n3], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -809,7 +809,7 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires a node with id [n1] and "
+ "cluster-manager not discovered or elected yet, an election requires a node with id [n1] and "
+ "at least 2 nodes with ids from [n2, n3, n4], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
@@ -859,7 +859,7 @@ public void testDescriptionAfterBootstrapping() {
// nodes from last-known cluster state could be in either order
is(
oneOf(
- "master not discovered or elected yet, an election requires two nodes with ids [n1, n2], "
+ "cluster-manager not discovered or elected yet, an election requires two nodes with ids [n1, n2], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
@@ -867,7 +867,7 @@ public void testDescriptionAfterBootstrapping() {
+ otherMasterNode
+ "] from last-known cluster state; node term 0, last-accepted version 0 in term 0",
- "master not discovered or elected yet, an election requires two nodes with ids [n1, n2], "
+ "cluster-manager not discovered or elected yet, an election requires two nodes with ids [n1, n2], "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ otherMasterNode
@@ -889,8 +889,8 @@ public void testDescriptionAfterBootstrapping() {
new StatusInfo(HEALTHY, "healthy-info")
).getDescription(),
is(
- "master not discovered or elected yet, an election requires one or more nodes that have already participated as "
- + "master-eligible nodes in the cluster but this node was not master-eligible the last time it joined the cluster, "
+ "cluster-manager not discovered or elected yet, an election requires one or more nodes that have already participated as "
+ + "cluster-manager-eligible nodes in the cluster but this node was not cluster-manager-eligible the last time it joined the cluster, "
+ "have discovered [] which is not a quorum; "
+ "discovery will continue using [] from hosts providers and ["
+ localNode
diff --git a/server/src/test/java/org/opensearch/cluster/coordination/CoordinatorTests.java b/server/src/test/java/org/opensearch/cluster/coordination/CoordinatorTests.java
index 1cdea588564c4..f43d6ff4e6c02 100644
--- a/server/src/test/java/org/opensearch/cluster/coordination/CoordinatorTests.java
+++ b/server/src/test/java/org/opensearch/cluster/coordination/CoordinatorTests.java
@@ -109,7 +109,7 @@ public class CoordinatorTests extends AbstractCoordinatorTestCase {
/**
* This test was added to verify that state recovery is properly reset on a node after it has become master and successfully
* recovered a state (see {@link GatewayService}). The situation which triggers this with a decent likelihood is as follows:
- * 3 master-eligible nodes (leader, follower1, follower2), the followers are shut down (leader remains), when followers come back
+ * 3 cluster-manager-eligible nodes (leader, follower1, follower2), the followers are shut down (leader remains), when followers come back
* one of them becomes leader and publishes first state (with STATE_NOT_RECOVERED_BLOCK) to old leader, which accepts it.
* Old leader is initiating an election at the same time, and wins election. It becomes leader again, but as it previously
* successfully completed state recovery, is never reset to a state where state recovery can be retried.
@@ -1558,7 +1558,9 @@ public void match(LogEvent event) {
final String message = event.getMessage().getFormattedMessage();
assertThat(
message,
- startsWith("master not discovered or elected yet, an election requires at least 2 nodes with ids from [")
+ startsWith(
+ "cluster-manager not discovered or elected yet, an election requires at least 2 nodes with ids from ["
+ )
);
final List matchingNodes = cluster.clusterNodes.stream()
@@ -1729,7 +1731,7 @@ public void testDoesNotPerformElectionWhenRestartingFollower() {
if (cluster.clusterNodes.stream().filter(n -> n.getLocalNode().isMasterNode()).count() == 2) {
// in the 2-node case, auto-shrinking the voting configuration is required to reduce the voting configuration down to just
- // the leader, otherwise restarting the other master-eligible node triggers an election
+ // the leader, otherwise restarting the other cluster-manager-eligible node triggers an election
leader.submitSetAutoShrinkVotingConfiguration(true);
cluster.stabilise(2 * DEFAULT_CLUSTER_STATE_UPDATE_DELAY); // 1st delay for the setting update, 2nd for the reconfiguration
}
diff --git a/server/src/test/java/org/opensearch/discovery/AbstractDisruptionTestCase.java b/server/src/test/java/org/opensearch/discovery/AbstractDisruptionTestCase.java
index 5a61300caa89e..e690770b3d0a5 100644
--- a/server/src/test/java/org/opensearch/discovery/AbstractDisruptionTestCase.java
+++ b/server/src/test/java/org/opensearch/discovery/AbstractDisruptionTestCase.java
@@ -167,7 +167,7 @@ void assertNoMaster(final String node, @Nullable final ClusterBlock expectedBloc
assertBusy(() -> {
ClusterState state = getNodeClusterState(node);
final DiscoveryNodes nodes = state.nodes();
- assertNull("node [" + node + "] still has [" + nodes.getMasterNode() + "] as master", nodes.getMasterNode());
+ assertNull("node [" + node + "] still has [" + nodes.getMasterNode() + "] as cluster-manager", nodes.getMasterNode());
if (expectedBlocks != null) {
for (ClusterBlockLevel level : expectedBlocks.levels()) {
assertTrue(
diff --git a/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java b/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java
index 9841daa5f81b7..6617102c12ffc 100644
--- a/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java
+++ b/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java
@@ -321,7 +321,7 @@ class Cluster implements Releasable {
);
logger.info(
- "--> creating cluster of {} nodes (master-eligible nodes: {}) with initial configuration {}",
+ "--> creating cluster of {} nodes (cluster-manager-eligible nodes: {}) with initial configuration {}",
initialNodeCount,
masterEligibleNodeIds,
initialConfiguration
diff --git a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java
index 3a28ec2efdd4b..a7c819609c619 100644
--- a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java
+++ b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java
@@ -1121,7 +1121,7 @@ private synchronized void reset(boolean wipeData) throws IOException {
}
assertTrue(
- "expected at least one master-eligible node left in " + nodes,
+ "expected at least one cluster-manager-eligible node left in " + nodes,
nodes.isEmpty() || nodes.values().stream().anyMatch(NodeAndClient::isMasterEligible)
);
@@ -1848,7 +1848,8 @@ private void restartNode(NodeAndClient nodeAndClient, RestartCallback callback)
publishNode(nodeAndClient);
if (callback.validateClusterForming() || excludedNodeIds.isEmpty() == false) {
- // we have to validate cluster size to ensure that the restarted node has rejoined the cluster if it was master-eligible;
+ // we have to validate cluster size to ensure that the restarted node has rejoined the cluster if it was
+ // cluster-manager-eligible;
validateClusterFormed();
}
}
@@ -1999,7 +2000,7 @@ public synchronized Set nodesInclude(String index) {
/**
* Performs cluster bootstrap when node with index {@link #bootstrapMasterNodeIndex} is started
- * with the names of all existing and new master-eligible nodes.
+ * with the names of all existing and new cluster-manager-eligible nodes.
* Indexing starts from 0.
* If {@link #bootstrapMasterNodeIndex} is -1 (default), this method does nothing.
*/