Skip to content

Commit 56c00ee

Browse files
authored
Remove string usages of old transport settings (elastic#41207)
This is related to elastic#36652. We intend to deprecate a number of transport settings in 7.x and remove them in 8.0. This commit removes the string usages of these settings.
1 parent 7e59794 commit 56c00ee

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

+5-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,11 @@ class ClusterFormationTasks {
412412
}
413413
esConfig['node.max_local_storage_nodes'] = node.config.numNodes
414414
esConfig['http.port'] = node.config.httpPort
415-
esConfig['transport.tcp.port'] = node.config.transportPort
415+
if (node.nodeVersion.onOrAfter('6.7.0')) {
416+
esConfig['transport.port'] = node.config.transportPort
417+
} else {
418+
esConfig['transport.tcp.port'] = node.config.transportPort
419+
}
416420
// Default the watermarks to absurdly low to prevent the tests from failing on nodes without enough disk space
417421
esConfig['cluster.routing.allocation.disk.watermark.low'] = '1b'
418422
esConfig['cluster.routing.allocation.disk.watermark.high'] = '1b'

buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,11 @@ private void createConfiguration() {
605605
defaultConfig.put("node.attr.testattr", "test");
606606
defaultConfig.put("node.portsfile", "true");
607607
defaultConfig.put("http.port", "0");
608-
defaultConfig.put("transport.tcp.port", "0");
608+
if (Version.fromString(version).onOrAfter(Version.fromString("6.7.0"))) {
609+
defaultConfig.put("transport.port", "0");
610+
} else {
611+
defaultConfig.put("transport.tcp.port", "0");
612+
}
609613
// Default the watermarks to absurdly low to prevent the tests from failing on nodes without enough disk space
610614
defaultConfig.put("cluster.routing.allocation.disk.watermark.low", "1b");
611615
defaultConfig.put("cluster.routing.allocation.disk.watermark.high", "1b");

server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected Settings nodeSettings(int nodeOrdinal) {
5959
.builder()
6060
.put(super.nodeSettings(nodeOrdinal))
6161
.put("discovery.type", "single-node")
62-
.put("transport.tcp.port", "0")
62+
.put("transport.port", "0")
6363
.build();
6464
}
6565

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ xpack.security.http.ssl.certificate: $ESCONFIG/certs/node-master/node-master.crt
259259
xpack.security.http.ssl.certificate_authorities: ["$ESCONFIG/certs/ca/ca.crt"]
260260
261261
xpack.security.transport.ssl.enabled: true
262-
transport.tcp.port: 9300
262+
transport.port: 9300
263263
264264
xpack.security.http.ssl.enabled: true
265265
http.port: 9200

0 commit comments

Comments
 (0)