Skip to content

Commit

Permalink
Replace 'master' terminology with 'cluster manager' in 'qa' directory (
Browse files Browse the repository at this point in the history
…#3330)

* Replace 'master' terminology with 'cluster manager' in 'qa' directory

Signed-off-by: Tianli Feng <ftianli@amazon.com>

* Replace master_node with cluster_manager_node in cluster.state API test

Signed-off-by: Tianli Feng <ftianli@amazon.com>
(cherry picked from commit e2ad4ff)
  • Loading branch information
Tianli Feng authored and github-actions[bot] committed May 16, 2022
1 parent 7e064a2 commit 159d512
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Node> {

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) {
Expand Down Expand Up @@ -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")) +
'}';
}
Expand Down
2 changes: 1 addition & 1 deletion qa/multi-cluster-search/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand All @@ -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:
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion qa/smoke-test-ingest-disabled/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ dependencies {
}

testClusters.integTest {
setting 'node.roles', '[data,master,remote_cluster_client]'
setting 'node.roles', '[data,cluster_manager,remote_cluster_client]'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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} }

0 comments on commit 159d512

Please sign in to comment.