diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java index e2ac51558d503..ad16fe3b7d4f4 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DeprecationChecks.java @@ -40,6 +40,7 @@ private DeprecationChecks() { Collections.unmodifiableList(Arrays.asList( NodeDeprecationChecks::httpEnabledSettingRemoved, NodeDeprecationChecks::tribeNodeCheck, + NodeDeprecationChecks::httpPipeliningCheck, NodeDeprecationChecks::azureRepositoryChanges, NodeDeprecationChecks::gcsRepositoryChanges, NodeDeprecationChecks::fileDiscoveryPluginRemoved diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java index 8a45c4e3edf0a..9828037957bca 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecks.java @@ -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; @@ -49,6 +50,21 @@ static DeprecationIssue tribeNodeCheck(List nodeInfos, List return null; } + static DeprecationIssue httpPipeliningCheck(List nodeInfos, List nodeStats) { + List 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 nodeInfos, List nodeStats) { List nodesFound = nodeInfos.stream() .filter(nodeInfo -> diff --git a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java index 55893949fe13f..1c7822a8ce221 100644 --- a/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java +++ b/x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/NodeDeprecationChecksTests.java @@ -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(