Replace 'master' terminology with 'cluster manager' in 'qa' directory (#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>
This commit is contained in:
Tianli Feng 2022-05-16 05:45:17 -07:00 committed by GitHub
parent 38fb1d9275
commit e2ad4ffbe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 19 deletions

View File

@ -659,7 +659,7 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase {
.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")

View File

@ -429,23 +429,23 @@ public class IndexingIT extends OpenSearchRestTestCase {
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) {
@ -480,7 +480,7 @@ public class IndexingIT extends OpenSearchRestTestCase {
@Override
public String toString() {
return "Nodes{" +
"masterNodeId='" + masterNodeId + "'\n" +
"masterNodeId='" + clusterManagerNodeId + "'\n" +
values().stream().map(Node::toString).collect(Collectors.joining("\n")) +
'}';
}

View File

@ -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) {

View File

@ -90,7 +90,7 @@ public class RecoveryIT extends AbstractRollingTestCase {
.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 class RecoveryIT extends AbstractRollingTestCase {
.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 class RecoveryIT extends AbstractRollingTestCase {
.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 class RecoveryIT extends AbstractRollingTestCase {
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 class RecoveryIT extends AbstractRollingTestCase {
.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 class RecoveryIT extends AbstractRollingTestCase {
.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")

View File

@ -38,5 +38,5 @@ dependencies {
}
testClusters.integTest {
setting 'node.roles', '[data,master,remote_cluster_client]'
setting 'node.roles', '[data,cluster_manager,remote_cluster_client]'
}

View File

@ -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} }