Skip to content
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 @@ -40,6 +40,7 @@ private DeprecationChecks() {
Collections.unmodifiableList(Arrays.asList(
NodeDeprecationChecks::httpEnabledSettingRemoved,
NodeDeprecationChecks::tribeNodeCheck,
NodeDeprecationChecks::httpPipeliningCheck,
NodeDeprecationChecks::azureRepositoryChanges,
NodeDeprecationChecks::gcsRepositoryChanges,
NodeDeprecationChecks::fileDiscoveryPluginRemoved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
import org.elasticsearch.action.admin.cluster.node.stats.NodeStats;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.http.HttpTransportSettings;
import org.elasticsearch.xpack.core.deprecation.DeprecationIssue;

import java.util.List;
Expand Down Expand Up @@ -49,6 +50,21 @@ static DeprecationIssue tribeNodeCheck(List<NodeInfo> nodeInfos, List<NodeStats>
return null;
}

static DeprecationIssue httpPipeliningCheck(List<NodeInfo> nodeInfos, List<NodeStats> nodeStats) {
List<String> nodesFound = nodeInfos.stream()
.filter(nodeInfo -> nodeInfo.getSettings().hasValue(HttpTransportSettings.SETTING_PIPELINING.getKey()))
.map(nodeInfo -> nodeInfo.getNode().getName())
.collect(Collectors.toList());
if (nodesFound.size() > 0) {
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
"HTTP pipelining setting removed as pipelining is now mandatory",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
"#remove-http-pipelining-setting",
"nodes with http.pipelining set: " + nodesFound);
}
return null;
}

static DeprecationIssue azureRepositoryChanges(List<NodeInfo> nodeInfos, List<NodeStats> nodeStats) {
List<String> nodesFound = nodeInfos.stream()
.filter(nodeInfo ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ public void testTribeNodeCheck() {
assertSettingsAndIssue(tribeSetting, randomAlphaOfLength(5), expected);
}

public void testHttpPipeliningCheck() {
DeprecationIssue expected = new DeprecationIssue(DeprecationIssue.Level.CRITICAL,
"HTTP pipelining setting removed as pipelining is now mandatory",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking_70_cluster_changes.html" +
"#remove-http-pipelining-setting",
"nodes with http.pipelining set: [node_check]");
assertSettingsAndIssue("http.pipelining", Boolean.toString(randomBoolean()), expected);
}

public void testAzurePluginCheck() {
Version esVersion = VersionUtils.randomVersionBetween(random(), Version.V_6_0_0, Version.CURRENT);
PluginInfo deprecatedPlugin = new PluginInfo(
Expand Down