From 159d512cfd7fab32b2d178f542e4af45439b1487 Mon Sep 17 00:00:00 2001 From: Tianli Feng Date: Mon, 16 May 2022 05:45:17 -0700 Subject: [PATCH] Replace 'master' terminology with 'cluster manager' in 'qa' directory (#3330) * Replace 'master' terminology with 'cluster manager' in 'qa' directory Signed-off-by: Tianli Feng * Replace master_node with cluster_manager_node in cluster.state API test Signed-off-by: Tianli Feng (cherry picked from commit e2ad4ffbe9dc98ce6a87c99f5839eaadf7f6bc33) --- .../opensearch/upgrades/FullClusterRestartIT.java | 2 +- .../java/org/opensearch/backwards/IndexingIT.java | 14 +++++++------- qa/multi-cluster-search/build.gradle | 2 +- .../java/org/opensearch/upgrades/RecoveryIT.java | 12 ++++++------ qa/smoke-test-ingest-disabled/build.gradle | 2 +- .../test/smoke_test_plugins/10_basic.yml | 6 +++--- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java index a8302fdd6bc76..714d8a252579f 100644 --- a/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java @@ -659,7 +659,7 @@ public void testEmptyShard() throws IOException { .put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1) .put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 1) // if the node with the replica is the first to be restarted, while a replica is still recovering - // then delayed allocation will kick in. When the node comes back, the master will search for a copy + // then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy // but the recovering copy will be seen as invalid and the cluster health won't return to GREEN // before timing out .put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms") diff --git a/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java b/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java index b133a6462a525..69c4f0110a3ff 100644 --- a/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java +++ b/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java @@ -429,23 +429,23 @@ private Nodes buildNodeAndVersions() throws IOException { HttpHost.create(objectPath.evaluate("nodes." + id + ".http.publish_address")))); } response = client().performRequest(new Request("GET", "_cluster/state")); - nodes.setMasterNodeId(ObjectPath.createFromResponse(response).evaluate("master_node")); + nodes.setClusterManagerNodeId(ObjectPath.createFromResponse(response).evaluate("master_node")); return nodes; } final class Nodes extends HashMap { - private String masterNodeId = null; + private String clusterManagerNodeId = null; - public Node getMaster() { - return get(masterNodeId); + public Node getClusterManager() { + return get(clusterManagerNodeId); } - public void setMasterNodeId(String id) { + public void setClusterManagerNodeId(String id) { if (get(id) == null) { throw new IllegalArgumentException("node with id [" + id + "] not found. got:" + toString()); } - masterNodeId = id; + clusterManagerNodeId = id; } public void add(Node node) { @@ -480,7 +480,7 @@ public Node getSafe(String id) { @Override public String toString() { return "Nodes{" + - "masterNodeId='" + masterNodeId + "'\n" + + "masterNodeId='" + clusterManagerNodeId + "'\n" + values().stream().map(Node::toString).collect(Collectors.joining("\n")) + '}'; } diff --git a/qa/multi-cluster-search/build.gradle b/qa/multi-cluster-search/build.gradle index 64aabf602e501..907791bd6a7de 100644 --- a/qa/multi-cluster-search/build.gradle +++ b/qa/multi-cluster-search/build.gradle @@ -45,7 +45,7 @@ task 'remote-cluster'(type: RestIntegTestTask) { testClusters.'remote-cluster' { numberOfNodes = 2 - setting 'node.roles', '[data,ingest,master]' + setting 'node.roles', '[data,ingest,cluster_manager]' } task mixedClusterTest(type: RestIntegTestTask) { diff --git a/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java b/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java index 687fd1743c3d3..cbf91fa9d71e7 100644 --- a/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java +++ b/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java @@ -90,7 +90,7 @@ public void testHistoryUUIDIsGenerated() throws Exception { .put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1) .put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 1) // if the node with the replica is the first to be restarted, while a replica is still recovering - // then delayed allocation will kick in. When the node comes back, the master will search for a copy + // then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy // but the recovering copy will be seen as invalid and the cluster health won't return to GREEN // before timing out .put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms"); @@ -158,7 +158,7 @@ public void testRecoveryWithConcurrentIndexing() throws Exception { .put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1) .put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 2) // if the node with the replica is the first to be restarted, while a replica is still recovering - // then delayed allocation will kick in. When the node comes back, the master will search for a copy + // then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy // but the recovering copy will be seen as invalid and the cluster health won't return to GREEN // before timing out .put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms") @@ -256,7 +256,7 @@ public void testRelocationWithConcurrentIndexing() throws Exception { .put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1) .put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 2) // if the node with the replica is the first to be restarted, while a replica is still recovering - // then delayed allocation will kick in. When the node comes back, the master will search for a copy + // then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy // but the recovering copy will be seen as invalid and the cluster health won't return to GREEN // before timing out .put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms") @@ -266,7 +266,7 @@ public void testRelocationWithConcurrentIndexing() throws Exception { indexDocs(index, 0, 10); ensureGreen(index); // make sure that no shards are allocated, so we can make sure the primary stays on the old node (when one - // node stops, we lose the master too, so a replica will not be promoted) + // node stops, we lose the cluster-manager too, so a replica will not be promoted) updateIndexSettings(index, Settings.builder().put(INDEX_ROUTING_ALLOCATION_ENABLE_SETTING.getKey(), "none")); break; case MIXED: @@ -330,7 +330,7 @@ public void testRecovery() throws Exception { .put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1) .put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 1) // if the node with the replica is the first to be restarted, while a replica is still recovering - // then delayed allocation will kick in. When the node comes back, the master will search for a copy + // then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy // but the recovering copy will be seen as invalid and the cluster health won't return to GREEN // before timing out .put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms") @@ -448,7 +448,7 @@ public void testRecoveryClosedIndex() throws Exception { .put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1) .put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 1) // if the node with the replica is the first to be restarted, while a replica is still recovering - // then delayed allocation will kick in. When the node comes back, the master will search for a copy + // then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy // but the recovering copy will be seen as invalid and the cluster health won't return to GREEN // before timing out .put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms") diff --git a/qa/smoke-test-ingest-disabled/build.gradle b/qa/smoke-test-ingest-disabled/build.gradle index d7676a5b5ecbd..79abbf84fbc09 100644 --- a/qa/smoke-test-ingest-disabled/build.gradle +++ b/qa/smoke-test-ingest-disabled/build.gradle @@ -38,5 +38,5 @@ dependencies { } testClusters.integTest { - setting 'node.roles', '[data,master,remote_cluster_client]' + setting 'node.roles', '[data,cluster_manager,remote_cluster_client]' } diff --git a/qa/smoke-test-plugins/src/test/resources/rest-api-spec/test/smoke_test_plugins/10_basic.yml b/qa/smoke-test-plugins/src/test/resources/rest-api-spec/test/smoke_test_plugins/10_basic.yml index 6a92845a062aa..a4c8d4baabd1b 100644 --- a/qa/smoke-test-plugins/src/test/resources/rest-api-spec/test/smoke_test_plugins/10_basic.yml +++ b/qa/smoke-test-plugins/src/test/resources/rest-api-spec/test/smoke_test_plugins/10_basic.yml @@ -4,10 +4,10 @@ - do: cluster.state: {} - # Get master node id - - set: { master_node: master } + # Get cluster-manager node id + - set: { cluster_manager_node: cluster_manager } - do: nodes.info: {} - - length: { nodes.$master.plugins: ${expected.plugins.count} } + - length: { nodes.$cluster_manager.plugins: ${expected.plugins.count} }