Browse Source

Remove deprecated transport settings (#40918)

This is related to #36652. There are a number of transport settings that
were deprecated and replaced with new versions in 7.x. This commit
removes them from 8.0.
Tim Brooks 6 years ago
parent
commit
07e0f0df21

+ 6 - 0
docs/reference/migration/migrate_8_0.asciidoc

@@ -19,6 +19,9 @@ coming[8.0.0]
 * <<breaking_80_security_changes>>
 * <<breaking_80_ilm_changes>>
 * <<breaking_80_java_changes>>
+* <<breaking_80_network_changes>>
+* <<breaking_80_transport_changes>>
+* <<breaking_80_http_changes>>
 
 //NOTE: The notable-breaking-changes tagged regions are re-used in the
 //Installation and Upgrade Guide
@@ -49,3 +52,6 @@ include::migrate_8_0/snapshots.asciidoc[]
 include::migrate_8_0/security.asciidoc[]
 include::migrate_8_0/ilm.asciidoc[]
 include::migrate_8_0/java.asciidoc[]
+include::migrate_8_0/network.asciidoc[]
+include::migrate_8_0/transport.asciidoc[]
+include::migrate_8_0/http.asciidoc[]

+ 15 - 0
docs/reference/migration/migrate_8_0/http.asciidoc

@@ -0,0 +1,15 @@
+[float]
+[[breaking_80_http_changes]]
+=== HTTP changes
+
+//NOTE: The notable-breaking-changes tagged regions are re-used in the
+//Installation and Upgrade Guide
+//tag::notable-breaking-changes[]
+
+// end::notable-breaking-changes[]
+
+[float]
+==== Removal of old HTTP settings
+
+The `http.tcp_no_delay` setting was deprecated in 7.x and has been removed in 8.0. It has been replaced by
+`http.tcp.no_delay`.

+ 16 - 0
docs/reference/migration/migrate_8_0/network.asciidoc

@@ -0,0 +1,16 @@
+[float]
+[[breaking_80_network_changes]]
+=== Network changes
+
+//NOTE: The notable-breaking-changes tagged regions are re-used in the
+//Installation and Upgrade Guide
+//tag::notable-breaking-changes[]
+
+// end::notable-breaking-changes[]
+
+[float]
+==== Removal of old network settings
+
+The `network.tcp.connect_timeout` setting was deprecated in 7.x and has been removed in 8.0. This setting
+was a fallback setting for `transport.connect_timeout`. To change the default connection timeout for client
+connections `transport.connect_timeout` should be modified.

+ 22 - 0
docs/reference/migration/migrate_8_0/transport.asciidoc

@@ -0,0 +1,22 @@
+[float]
+[[breaking_80_transport_changes]]
+=== Transport changes
+
+//tag::notable-breaking-changes[]
+[float]
+==== Removal of old transport settings
+
+The following settings have been deprecated in 7.x and removed in 8.0. Each setting has a replacement
+setting that was introduced in 6.7.
+
+- `transport.tcp.port` replaced by `transport.port`
+- `transport.tcp.compress` replaced by `transport.compress`
+- `transport.tcp.connect_timeout` replaced by `transport.connect_timeout`
+- `transport.tcp_no_delay` replaced by `transport.tcp.no_delay`
+- `transport.profiles.profile_name.tcp_no_delay` replaced by `transport.profiles.profile_name.tcp.no_delay`
+- `transport.profiles.profile_name.tcp_keep_alive` replaced by `transport.profiles.profile_name.tcp.keep_alive`
+- `transport.profiles.profile_name.reuse_address` replaced by `transport.profiles.profile_name.tcp.reuse_address`
+- `transport.profiles.profile_name.send_buffer_size` replaced by `transport.profiles.profile_name.tcp.send_buffer_size`
+- `transport.profiles.profile_name.receive_buffer_size` replaced by `transport.profiles.profile_name.tcp.receive_buffer_size`
+
+// end::notable-breaking-changes[]

+ 1 - 1
modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportMultiPortIntegrationIT.java

@@ -65,7 +65,7 @@ public class Netty4TransportMultiPortIntegrationIT extends ESNetty4IntegTestCase
             .put("transport.profiles.client1.port", randomPortRange)
             .put("transport.profiles.client1.publish_host", "127.0.0.7")
             .put("transport.profiles.client1.publish_port", "4321")
-            .put("transport.profiles.client1.reuse_address", true);
+            .put("transport.profiles.client1.tcp.reuse_address", true);
         return builder.build();
     }
 

+ 0 - 5
server/src/main/java/org/elasticsearch/common/network/NetworkService.java

@@ -22,7 +22,6 @@ package org.elasticsearch.common.network;
 import org.elasticsearch.common.settings.Setting;
 import org.elasticsearch.common.settings.Setting.Property;
 import org.elasticsearch.common.unit.ByteSizeValue;
-import org.elasticsearch.common.unit.TimeValue;
 
 import java.io.IOException;
 import java.net.InetAddress;
@@ -32,7 +31,6 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Objects;
-import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
 
 public final class NetworkService {
@@ -58,9 +56,6 @@ public final class NetworkService {
         Setting.byteSizeSetting("network.tcp.send_buffer_size", new ByteSizeValue(-1), Property.NodeScope);
     public static final Setting<ByteSizeValue> TCP_RECEIVE_BUFFER_SIZE =
         Setting.byteSizeSetting("network.tcp.receive_buffer_size", new ByteSizeValue(-1), Property.NodeScope);
-    public static final Setting<TimeValue> TCP_CONNECT_TIMEOUT =
-        Setting.timeSetting("network.tcp.connect_timeout", new TimeValue(30, TimeUnit.SECONDS), Property.NodeScope,
-            Setting.Property.Deprecated);
 
     /**
      * A custom name resolver can support custom lookup keys (my_net_key:ipv4) and also change

+ 0 - 11
server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java

@@ -261,7 +261,6 @@ public final class ClusterSettings extends AbstractScopedSettings {
                     HttpTransportSettings.SETTING_HTTP_MAX_INITIAL_LINE_LENGTH,
                     HttpTransportSettings.SETTING_HTTP_READ_TIMEOUT,
                     HttpTransportSettings.SETTING_HTTP_RESET_COOKIES,
-                    HttpTransportSettings.OLD_SETTING_HTTP_TCP_NO_DELAY,
                     HttpTransportSettings.SETTING_HTTP_TCP_NO_DELAY,
                     HttpTransportSettings.SETTING_HTTP_TCP_KEEP_ALIVE,
                     HttpTransportSettings.SETTING_HTTP_TCP_REUSE_ADDRESS,
@@ -309,32 +308,23 @@ public final class ClusterSettings extends AbstractScopedSettings {
                     TransportSettings.PUBLISH_HOST_PROFILE,
                     TransportSettings.BIND_HOST,
                     TransportSettings.BIND_HOST_PROFILE,
-                    TransportSettings.OLD_PORT,
                     TransportSettings.PORT,
                     TransportSettings.PORT_PROFILE,
                     TransportSettings.PUBLISH_PORT,
                     TransportSettings.PUBLISH_PORT_PROFILE,
-                    TransportSettings.OLD_TRANSPORT_COMPRESS,
                     TransportSettings.TRANSPORT_COMPRESS,
                     TransportSettings.PING_SCHEDULE,
-                    TransportSettings.TCP_CONNECT_TIMEOUT,
                     TransportSettings.CONNECT_TIMEOUT,
                     TransportSettings.DEFAULT_FEATURES_SETTING,
-                    TransportSettings.OLD_TCP_NO_DELAY,
                     TransportSettings.TCP_NO_DELAY,
-                    TransportSettings.OLD_TCP_NO_DELAY_PROFILE,
                     TransportSettings.TCP_NO_DELAY_PROFILE,
                     TransportSettings.TCP_KEEP_ALIVE,
-                    TransportSettings.OLD_TCP_KEEP_ALIVE_PROFILE,
                     TransportSettings.TCP_KEEP_ALIVE_PROFILE,
                     TransportSettings.TCP_REUSE_ADDRESS,
-                    TransportSettings.OLD_TCP_REUSE_ADDRESS_PROFILE,
                     TransportSettings.TCP_REUSE_ADDRESS_PROFILE,
                     TransportSettings.TCP_SEND_BUFFER_SIZE,
-                    TransportSettings.OLD_TCP_SEND_BUFFER_SIZE_PROFILE,
                     TransportSettings.TCP_SEND_BUFFER_SIZE_PROFILE,
                     TransportSettings.TCP_RECEIVE_BUFFER_SIZE,
-                    TransportSettings.OLD_TCP_RECEIVE_BUFFER_SIZE_PROFILE,
                     TransportSettings.TCP_RECEIVE_BUFFER_SIZE_PROFILE,
                     TransportSettings.CONNECTIONS_PER_NODE_RECOVERY,
                     TransportSettings.CONNECTIONS_PER_NODE_BULK,
@@ -352,7 +342,6 @@ public final class ClusterSettings extends AbstractScopedSettings {
                     NetworkService.TCP_REUSE_ADDRESS,
                     NetworkService.TCP_SEND_BUFFER_SIZE,
                     NetworkService.TCP_RECEIVE_BUFFER_SIZE,
-                    NetworkService.TCP_CONNECT_TIMEOUT,
                     IndexSettings.QUERY_STRING_ANALYZE_WILDCARD,
                     IndexSettings.QUERY_STRING_ALLOW_LEADING_WILDCARD,
                     ScriptService.SCRIPT_CACHE_SIZE_SETTING,

+ 1 - 3
server/src/main/java/org/elasticsearch/http/HttpTransportSettings.java

@@ -107,10 +107,8 @@ public final class HttpTransportSettings {
 
     // Tcp socket settings
 
-    public static final Setting<Boolean> OLD_SETTING_HTTP_TCP_NO_DELAY =
-        boolSetting("http.tcp_no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope, Setting.Property.Deprecated);
     public static final Setting<Boolean> SETTING_HTTP_TCP_NO_DELAY =
-        boolSetting("http.tcp.no_delay", OLD_SETTING_HTTP_TCP_NO_DELAY, Setting.Property.NodeScope);
+        boolSetting("http.tcp.no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope);
     public static final Setting<Boolean> SETTING_HTTP_TCP_KEEP_ALIVE =
         boolSetting("http.tcp.keep_alive", NetworkService.TCP_KEEP_ALIVE, Setting.Property.NodeScope);
     public static final Setting<Boolean> SETTING_HTTP_TCP_REUSE_ADDRESS =

+ 10 - 45
server/src/main/java/org/elasticsearch/transport/TransportSettings.java

@@ -27,6 +27,7 @@ import org.elasticsearch.common.unit.TimeValue;
 
 import java.util.Arrays;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
 
 import static java.util.Collections.emptyList;
@@ -52,84 +53,48 @@ public final class TransportSettings {
         listSetting("transport.bind_host", HOST, Function.identity(), Setting.Property.NodeScope);
     public static final Setting.AffixSetting<List<String>> BIND_HOST_PROFILE = affixKeySetting("transport.profiles.", "bind_host",
         key -> listSetting(key, BIND_HOST, Function.identity(), Setting.Property.NodeScope));
-    public static final Setting<String> OLD_PORT =
-        new Setting<>("transport.tcp.port", "9300-9400", Function.identity(), Setting.Property.NodeScope, Setting.Property.Deprecated);
     public static final Setting<String> PORT =
-        new Setting<>("transport.port", OLD_PORT, Function.identity(), Setting.Property.NodeScope);
+        new Setting<>("transport.port", "9300-9400", Function.identity(), Setting.Property.NodeScope);
     public static final Setting.AffixSetting<String> PORT_PROFILE = affixKeySetting("transport.profiles.", "port",
         key -> new Setting<>(key, PORT, Function.identity(), Setting.Property.NodeScope));
     public static final Setting<Integer> PUBLISH_PORT =
         intSetting("transport.publish_port", -1, -1, Setting.Property.NodeScope);
     public static final Setting.AffixSetting<Integer> PUBLISH_PORT_PROFILE = affixKeySetting("transport.profiles.", "publish_port",
         key -> intSetting(key, -1, -1, Setting.Property.NodeScope));
-    public static final Setting<Boolean> OLD_TRANSPORT_COMPRESS =
-        boolSetting("transport.tcp.compress", false, Setting.Property.NodeScope, Setting.Property.Deprecated);
     public static final Setting<Boolean> TRANSPORT_COMPRESS =
-        boolSetting("transport.compress", OLD_TRANSPORT_COMPRESS, Setting.Property.NodeScope);
+        boolSetting("transport.compress", false, Setting.Property.NodeScope);
     // the scheduled internal ping interval setting, defaults to disabled (-1)
     public static final Setting<TimeValue> PING_SCHEDULE =
         timeSetting("transport.ping_schedule", TimeValue.timeValueSeconds(-1), Setting.Property.NodeScope);
-    public static final Setting<TimeValue> TCP_CONNECT_TIMEOUT =
-        timeSetting("transport.tcp.connect_timeout", NetworkService.TCP_CONNECT_TIMEOUT, Setting.Property.NodeScope,
-            Setting.Property.Deprecated);
     public static final Setting<TimeValue> CONNECT_TIMEOUT =
-        timeSetting("transport.connect_timeout", TCP_CONNECT_TIMEOUT, Setting.Property.NodeScope);
+        timeSetting("transport.connect_timeout", new TimeValue(30, TimeUnit.SECONDS), Setting.Property.NodeScope);
     public static final Setting<Settings> DEFAULT_FEATURES_SETTING = Setting.groupSetting(FEATURE_PREFIX + ".", Setting.Property.NodeScope);
 
     // Tcp socket settings
 
-    public static final Setting<Boolean> OLD_TCP_NO_DELAY =
-        boolSetting("transport.tcp_no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope, Setting.Property.Deprecated);
     public static final Setting<Boolean> TCP_NO_DELAY =
-        boolSetting("transport.tcp.no_delay", OLD_TCP_NO_DELAY, Setting.Property.NodeScope);
-    public static final Setting.AffixSetting<Boolean> OLD_TCP_NO_DELAY_PROFILE =
-        affixKeySetting("transport.profiles.", "tcp_no_delay", key -> boolSetting(key, TCP_NO_DELAY, Setting.Property.NodeScope,
-            Setting.Property.Deprecated));
+        boolSetting("transport.tcp.no_delay", NetworkService.TCP_NO_DELAY, Setting.Property.NodeScope);
     public static final Setting.AffixSetting<Boolean> TCP_NO_DELAY_PROFILE =
-        affixKeySetting("transport.profiles.", "tcp.no_delay",
-            key -> boolSetting(key,
-                fallback(key, OLD_TCP_NO_DELAY_PROFILE, "tcp\\.no_delay$", "tcp_no_delay"),
-                Setting.Property.NodeScope));
+        affixKeySetting("transport.profiles.", "tcp.no_delay", key -> boolSetting(key, TCP_NO_DELAY, Setting.Property.NodeScope));
     public static final Setting<Boolean> TCP_KEEP_ALIVE =
         boolSetting("transport.tcp.keep_alive", NetworkService.TCP_KEEP_ALIVE, Setting.Property.NodeScope);
-    public static final Setting.AffixSetting<Boolean> OLD_TCP_KEEP_ALIVE_PROFILE =
-        affixKeySetting("transport.profiles.", "tcp_keep_alive",
-            key -> boolSetting(key, TCP_KEEP_ALIVE, Setting.Property.NodeScope, Setting.Property.Deprecated));
     public static final Setting.AffixSetting<Boolean> TCP_KEEP_ALIVE_PROFILE =
         affixKeySetting("transport.profiles.", "tcp.keep_alive",
-            key -> boolSetting(key,
-                fallback(key, OLD_TCP_KEEP_ALIVE_PROFILE, "tcp\\.keep_alive$", "tcp_keep_alive"),
-                Setting.Property.NodeScope));
+            key -> boolSetting(key, TCP_KEEP_ALIVE, Setting.Property.NodeScope));
     public static final Setting<Boolean> TCP_REUSE_ADDRESS =
         boolSetting("transport.tcp.reuse_address", NetworkService.TCP_REUSE_ADDRESS, Setting.Property.NodeScope);
-    public static final Setting.AffixSetting<Boolean> OLD_TCP_REUSE_ADDRESS_PROFILE =
-        affixKeySetting("transport.profiles.", "reuse_address", key -> boolSetting(key, TCP_REUSE_ADDRESS, Setting.Property.NodeScope,
-            Setting.Property.Deprecated));
     public static final Setting.AffixSetting<Boolean> TCP_REUSE_ADDRESS_PROFILE =
-        affixKeySetting("transport.profiles.", "tcp.reuse_address",
-            key -> boolSetting(key,
-                fallback(key, OLD_TCP_REUSE_ADDRESS_PROFILE, "tcp\\.reuse_address$", "reuse_address"),
-                Setting.Property.NodeScope));
+        affixKeySetting("transport.profiles.", "tcp.reuse_address", key -> boolSetting(key, TCP_REUSE_ADDRESS, Setting.Property.NodeScope));
     public static final Setting<ByteSizeValue> TCP_SEND_BUFFER_SIZE =
         Setting.byteSizeSetting("transport.tcp.send_buffer_size", NetworkService.TCP_SEND_BUFFER_SIZE, Setting.Property.NodeScope);
-    public static final Setting.AffixSetting<ByteSizeValue> OLD_TCP_SEND_BUFFER_SIZE_PROFILE =
-        affixKeySetting("transport.profiles.", "send_buffer_size",
-            key -> Setting.byteSizeSetting(key, TCP_SEND_BUFFER_SIZE, Setting.Property.NodeScope, Setting.Property.Deprecated));
     public static final Setting.AffixSetting<ByteSizeValue> TCP_SEND_BUFFER_SIZE_PROFILE =
         affixKeySetting("transport.profiles.", "tcp.send_buffer_size",
-            key -> Setting.byteSizeSetting(key,
-                fallback(key, OLD_TCP_SEND_BUFFER_SIZE_PROFILE, "tcp\\.send_buffer_size$", "send_buffer_size"),
-                Setting.Property.NodeScope));
+            key -> Setting.byteSizeSetting(key, TCP_SEND_BUFFER_SIZE, Setting.Property.NodeScope));
     public static final Setting<ByteSizeValue> TCP_RECEIVE_BUFFER_SIZE =
         Setting.byteSizeSetting("transport.tcp.receive_buffer_size", NetworkService.TCP_RECEIVE_BUFFER_SIZE, Setting.Property.NodeScope);
-    public static final Setting.AffixSetting<ByteSizeValue> OLD_TCP_RECEIVE_BUFFER_SIZE_PROFILE =
-        affixKeySetting("transport.profiles.", "receive_buffer_size",
-            key -> Setting.byteSizeSetting(key, TCP_RECEIVE_BUFFER_SIZE, Setting.Property.NodeScope, Setting.Property.Deprecated));
     public static final Setting.AffixSetting<ByteSizeValue> TCP_RECEIVE_BUFFER_SIZE_PROFILE =
         affixKeySetting("transport.profiles.", "tcp.receive_buffer_size",
-            key -> Setting.byteSizeSetting(key,
-                fallback(key, OLD_TCP_RECEIVE_BUFFER_SIZE_PROFILE, "tcp\\.receive_buffer_size$", "receive_buffer_size"),
-                Setting.Property.NodeScope));
+            key -> Setting.byteSizeSetting(key, TCP_RECEIVE_BUFFER_SIZE, Setting.Property.NodeScope));
 
     // Connections per node settings
 

+ 1 - 1
x-pack/qa/vagrant/src/test/resources/packaging/tests/certgen.bash

@@ -345,7 +345,7 @@ xpack.security.http.ssl.certificate: $ESCONFIG/certs//node-data/node-data.crt
 xpack.security.http.ssl.certificate_authorities: ["$ESCONFIG/certs/ca/ca.crt"]
 
 xpack.security.transport.ssl.enabled: true
-transport.tcp.port: 9301
+transport.port: 9301
 
 xpack.security.http.ssl.enabled: true
 http.port: 9201