Skip to content

Commit 8509163

Browse files
opensearch-trigger-bot[bot]Tianli Feng
andauthored
Replace 'master' terminology with 'cluster manager' in 'qa' directory (#3330) (#3332)
* Replace 'master' terminology with 'cluster manager' in 'qa' directory Signed-off-by: Tianli Feng <[email protected]> * Replace master_node with cluster_manager_node in cluster.state API test Signed-off-by: Tianli Feng <[email protected]> (cherry picked from commit e2ad4ff) Co-authored-by: Tianli Feng <[email protected]>
1 parent 1c18e58 commit 8509163

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ public void testEmptyShard() throws IOException {
659659
.put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1)
660660
.put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 1)
661661
// if the node with the replica is the first to be restarted, while a replica is still recovering
662-
// then delayed allocation will kick in. When the node comes back, the master will search for a copy
662+
// then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy
663663
// but the recovering copy will be seen as invalid and the cluster health won't return to GREEN
664664
// before timing out
665665
.put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms")

qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -429,23 +429,23 @@ private Nodes buildNodeAndVersions() throws IOException {
429429
HttpHost.create(objectPath.evaluate("nodes." + id + ".http.publish_address"))));
430430
}
431431
response = client().performRequest(new Request("GET", "_cluster/state"));
432-
nodes.setMasterNodeId(ObjectPath.createFromResponse(response).evaluate("master_node"));
432+
nodes.setClusterManagerNodeId(ObjectPath.createFromResponse(response).evaluate("master_node"));
433433
return nodes;
434434
}
435435

436436
final class Nodes extends HashMap<String, Node> {
437437

438-
private String masterNodeId = null;
438+
private String clusterManagerNodeId = null;
439439

440-
public Node getMaster() {
441-
return get(masterNodeId);
440+
public Node getClusterManager() {
441+
return get(clusterManagerNodeId);
442442
}
443443

444-
public void setMasterNodeId(String id) {
444+
public void setClusterManagerNodeId(String id) {
445445
if (get(id) == null) {
446446
throw new IllegalArgumentException("node with id [" + id + "] not found. got:" + toString());
447447
}
448-
masterNodeId = id;
448+
clusterManagerNodeId = id;
449449
}
450450

451451
public void add(Node node) {
@@ -480,7 +480,7 @@ public Node getSafe(String id) {
480480
@Override
481481
public String toString() {
482482
return "Nodes{" +
483-
"masterNodeId='" + masterNodeId + "'\n" +
483+
"masterNodeId='" + clusterManagerNodeId + "'\n" +
484484
values().stream().map(Node::toString).collect(Collectors.joining("\n")) +
485485
'}';
486486
}

qa/multi-cluster-search/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ task 'remote-cluster'(type: RestIntegTestTask) {
4545

4646
testClusters.'remote-cluster' {
4747
numberOfNodes = 2
48-
setting 'node.roles', '[data,ingest,master]'
48+
setting 'node.roles', '[data,ingest,cluster_manager]'
4949
}
5050

5151
task mixedClusterTest(type: RestIntegTestTask) {

qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void testHistoryUUIDIsGenerated() throws Exception {
9090
.put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1)
9191
.put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 1)
9292
// if the node with the replica is the first to be restarted, while a replica is still recovering
93-
// then delayed allocation will kick in. When the node comes back, the master will search for a copy
93+
// then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy
9494
// but the recovering copy will be seen as invalid and the cluster health won't return to GREEN
9595
// before timing out
9696
.put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms");
@@ -158,7 +158,7 @@ public void testRecoveryWithConcurrentIndexing() throws Exception {
158158
.put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1)
159159
.put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 2)
160160
// if the node with the replica is the first to be restarted, while a replica is still recovering
161-
// then delayed allocation will kick in. When the node comes back, the master will search for a copy
161+
// then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy
162162
// but the recovering copy will be seen as invalid and the cluster health won't return to GREEN
163163
// before timing out
164164
.put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms")
@@ -256,7 +256,7 @@ public void testRelocationWithConcurrentIndexing() throws Exception {
256256
.put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1)
257257
.put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 2)
258258
// if the node with the replica is the first to be restarted, while a replica is still recovering
259-
// then delayed allocation will kick in. When the node comes back, the master will search for a copy
259+
// then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy
260260
// but the recovering copy will be seen as invalid and the cluster health won't return to GREEN
261261
// before timing out
262262
.put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms")
@@ -266,7 +266,7 @@ public void testRelocationWithConcurrentIndexing() throws Exception {
266266
indexDocs(index, 0, 10);
267267
ensureGreen(index);
268268
// make sure that no shards are allocated, so we can make sure the primary stays on the old node (when one
269-
// node stops, we lose the master too, so a replica will not be promoted)
269+
// node stops, we lose the cluster-manager too, so a replica will not be promoted)
270270
updateIndexSettings(index, Settings.builder().put(INDEX_ROUTING_ALLOCATION_ENABLE_SETTING.getKey(), "none"));
271271
break;
272272
case MIXED:
@@ -330,7 +330,7 @@ public void testRecovery() throws Exception {
330330
.put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1)
331331
.put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 1)
332332
// if the node with the replica is the first to be restarted, while a replica is still recovering
333-
// then delayed allocation will kick in. When the node comes back, the master will search for a copy
333+
// then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy
334334
// but the recovering copy will be seen as invalid and the cluster health won't return to GREEN
335335
// before timing out
336336
.put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms")
@@ -448,7 +448,7 @@ public void testRecoveryClosedIndex() throws Exception {
448448
.put(IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1)
449449
.put(IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 1)
450450
// if the node with the replica is the first to be restarted, while a replica is still recovering
451-
// then delayed allocation will kick in. When the node comes back, the master will search for a copy
451+
// then delayed allocation will kick in. When the node comes back, the cluster-manager will search for a copy
452452
// but the recovering copy will be seen as invalid and the cluster health won't return to GREEN
453453
// before timing out
454454
.put(INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), "100ms")

qa/smoke-test-ingest-disabled/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ dependencies {
3838
}
3939

4040
testClusters.integTest {
41-
setting 'node.roles', '[data,master,remote_cluster_client]'
41+
setting 'node.roles', '[data,cluster_manager,remote_cluster_client]'
4242
}

qa/smoke-test-plugins/src/test/resources/rest-api-spec/test/smoke_test_plugins/10_basic.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
- do:
55
cluster.state: {}
66

7-
# Get master node id
8-
- set: { master_node: master }
7+
# Get cluster-manager node id
8+
- set: { cluster_manager_node: cluster_manager }
99

1010
- do:
1111
nodes.info: {}
1212

13-
- length: { nodes.$master.plugins: ${expected.plugins.count} }
13+
- length: { nodes.$cluster_manager.plugins: ${expected.plugins.count} }

0 commit comments

Comments
 (0)