Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Replace 'master' terminology with 'cluster manager' in 'qa' directory #3332

Merged
merged 1 commit into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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} }