From 1d11b554d207a2ae24fbadf72303ff3e538f420b Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Thu, 8 Nov 2018 15:29:49 +0100 Subject: [PATCH 1/5] DISCOVERY: Fix RollingUpgradeTests * Don't manually manage min master nodes * Remove some dead code * Closes #35178 --- qa/rolling-upgrade/build.gradle | 2 -- x-pack/qa/rolling-upgrade-basic/build.gradle | 5 ----- x-pack/qa/rolling-upgrade/build.gradle | 3 --- 3 files changed, 10 deletions(-) diff --git a/qa/rolling-upgrade/build.gradle b/qa/rolling-upgrade/build.gradle index 4e27511fe04fb..0c4d352661c00 100644 --- a/qa/rolling-upgrade/build.gradle +++ b/qa/rolling-upgrade/build.gradle @@ -56,7 +56,6 @@ for (Version version : bwcVersions.wireCompatible) { mustRunAfter(precommit) } - Object extension = extensions.findByName("${baseName}#oldClusterTestCluster") configure(extensions.findByName("${baseName}#oldClusterTestCluster")) { bwcVersion = version numBwcNodes = 3 @@ -78,7 +77,6 @@ for (Version version : bwcVersions.wireCompatible) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" clusterName = 'rolling-upgrade' unicastTransportUri = { seedNode, node, ant -> unicastSeed() } - minimumMasterNodes = { 3 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } diff --git a/x-pack/qa/rolling-upgrade-basic/build.gradle b/x-pack/qa/rolling-upgrade-basic/build.gradle index c3cec6695bbe6..bd539248b2a4e 100644 --- a/x-pack/qa/rolling-upgrade-basic/build.gradle +++ b/x-pack/qa/rolling-upgrade-basic/build.gradle @@ -1,9 +1,6 @@ import org.elasticsearch.gradle.Version -import org.elasticsearch.gradle.test.NodeInfo import org.elasticsearch.gradle.test.RestIntegTestTask -import java.nio.charset.StandardCharsets - apply plugin: 'elasticsearch.standalone-test' dependencies { @@ -40,7 +37,6 @@ for (Version version : bwcVersions.wireCompatible) { bwcVersion = version numBwcNodes = 3 numNodes = 3 - minimumMasterNodes = { 3 } clusterName = 'rolling-upgrade-basic' setting 'xpack.security.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' @@ -59,7 +55,6 @@ for (Version version : bwcVersions.wireCompatible) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" clusterName = 'rolling-upgrade-basic' unicastTransportUri = { seedNode, node, ant -> unicastSeed() } - minimumMasterNodes = { 3 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } diff --git a/x-pack/qa/rolling-upgrade/build.gradle b/x-pack/qa/rolling-upgrade/build.gradle index ca149ba7e16ff..10fa3a09d66b0 100644 --- a/x-pack/qa/rolling-upgrade/build.gradle +++ b/x-pack/qa/rolling-upgrade/build.gradle @@ -120,7 +120,6 @@ subprojects { mustRunAfter(precommit) } - Object extension = extensions.findByName("${baseName}#oldClusterTestCluster") configure(extensions.findByName("${baseName}#oldClusterTestCluster")) { dependsOn copyTestNodeKeystore if (version.before('6.3.0')) { @@ -135,7 +134,6 @@ subprojects { bwcVersion = version numBwcNodes = 3 numNodes = 3 - minimumMasterNodes = { 3 } clusterName = 'rolling-upgrade' waitCondition = waitWithAuth setting 'xpack.monitoring.exporters._http.type', 'http' @@ -189,7 +187,6 @@ subprojects { setupCommand 'setupTestUser', 'bin/elasticsearch-users', 'useradd', 'test_user', '-p', 'x-pack-test-password', '-r', 'superuser' clusterName = 'rolling-upgrade' unicastTransportUri = { seedNode, node, ant -> unicastSeed() } - minimumMasterNodes = { 3 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } From c033c7419b93eaa70cbc01b4f492e57ca5b1380e Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Thu, 8 Nov 2018 17:16:56 +0100 Subject: [PATCH 2/5] CR: Allow for manually supplying list of seed nodes --- .../gradle/test/ClusterConfiguration.groovy | 8 ++++++++ .../gradle/test/ClusterFormationTasks.groovy | 13 +++++++++---- qa/rolling-upgrade/build.gradle | 8 ++++---- x-pack/qa/rolling-upgrade-basic/build.gradle | 8 ++++---- x-pack/qa/rolling-upgrade/build.gradle | 8 ++++---- 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy index e8415fa66fd43..fa34b7ad716fc 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy @@ -110,6 +110,14 @@ class ClusterConfiguration { return seedNode.transportUri() } + /** + * A close to call which returns a manually supplied list of unicast seed hosts. + */ + @Input + Closure> manualSeedUris = { + Collections.emptyList() + } + /** * A closure to call before the cluster is considered ready. The closure is passed the node info, * as well as a groovy AntBuilder, to enable running ant condition checks. The default wait diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index 2c034f6e4f4b9..99442ab390ca1 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -715,10 +715,15 @@ class ClusterFormationTasks { wait.doLast { Collection unicastHosts = new HashSet<>() - nodes.forEach { otherNode -> - String unicastHost = otherNode.config.unicastTransportUri(otherNode, null, project.ant) - if (unicastHost != null) { - unicastHosts.addAll(Arrays.asList(unicastHost.split(","))) + nodes.forEach { node -> + List manualSeedUris = node.config.manualSeedUris.call() + if (manualSeedUris.empty == false) { + unicastHosts.addAll(manualSeedUris) + } else { + String unicastHost = node.config.unicastTransportUri(node, null, project.ant) + if (unicastHost != null) { + unicastHosts.addAll(Arrays.asList(unicastHost.split(","))) + } } } String unicastHostsTxt = String.join("\n", unicastHosts) diff --git a/qa/rolling-upgrade/build.gradle b/qa/rolling-upgrade/build.gradle index 0c4d352661c00..f282ccf5c1422 100644 --- a/qa/rolling-upgrade/build.gradle +++ b/qa/rolling-upgrade/build.gradle @@ -76,7 +76,7 @@ for (Version version : bwcVersions.wireCompatible) { configure(extensions.findByName("${baseName}#${name}")) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" clusterName = 'rolling-upgrade' - unicastTransportUri = { seedNode, node, ant -> unicastSeed() } + manualSeedUris = { unicastSeed() } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } @@ -89,7 +89,7 @@ for (Version version : bwcVersions.wireCompatible) { configureUpgradeCluster("oneThirdUpgradedTestCluster", oldClusterTestRunner, 0, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oldClusterTest.nodes.get(1).transportUri() + ',' + oldClusterTest.nodes.get(2).transportUri() }) + { [oldClusterTest.nodes.get(1).transportUri(), oldClusterTest.nodes.get(2).transportUri()] }) Task oneThirdUpgradedTestRunner = tasks.getByName("${baseName}#oneThirdUpgradedTestRunner") oneThirdUpgradedTestRunner.configure { @@ -102,7 +102,7 @@ for (Version version : bwcVersions.wireCompatible) { configureUpgradeCluster("twoThirdsUpgradedTestCluster", oneThirdUpgradedTestRunner, 1, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oldClusterTest.nodes.get(2).transportUri() + ',' + oneThirdUpgradedTest.nodes.get(0).transportUri() }) + { [oldClusterTest.nodes.get(2).transportUri(), oneThirdUpgradedTest.nodes.get(0).transportUri()] }) Task twoThirdsUpgradedTestRunner = tasks.getByName("${baseName}#twoThirdsUpgradedTestRunner") twoThirdsUpgradedTestRunner.configure { @@ -115,7 +115,7 @@ for (Version version : bwcVersions.wireCompatible) { configureUpgradeCluster("upgradedClusterTestCluster", twoThirdsUpgradedTestRunner, 2, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oneThirdUpgradedTest.nodes.get(0).transportUri() + ',' + twoThirdsUpgradedTest.nodes.get(0).transportUri() }) + { [oneThirdUpgradedTest.nodes.get(0).transportUri(), twoThirdsUpgradedTest.nodes.get(0).transportUri()] }) Task upgradedClusterTestRunner = tasks.getByName("${baseName}#upgradedClusterTestRunner") upgradedClusterTestRunner.configure { diff --git a/x-pack/qa/rolling-upgrade-basic/build.gradle b/x-pack/qa/rolling-upgrade-basic/build.gradle index bd539248b2a4e..cf0cfb49a5fb6 100644 --- a/x-pack/qa/rolling-upgrade-basic/build.gradle +++ b/x-pack/qa/rolling-upgrade-basic/build.gradle @@ -54,7 +54,7 @@ for (Version version : bwcVersions.wireCompatible) { configure(extensions.findByName("${baseName}#${name}")) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" clusterName = 'rolling-upgrade-basic' - unicastTransportUri = { seedNode, node, ant -> unicastSeed() } + manualSeedUris = { unicastSeed() } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } @@ -72,7 +72,7 @@ for (Version version : bwcVersions.wireCompatible) { configureUpgradeCluster("oneThirdUpgradedTestCluster", oldClusterTestRunner, 0, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oldClusterTest.nodes.get(1).transportUri() + ',' + oldClusterTest.nodes.get(2).transportUri() }) + { [oldClusterTest.nodes.get(1).transportUri(), oldClusterTest.nodes.get(2).transportUri()] }) Task oneThirdUpgradedTestRunner = tasks.getByName("${baseName}#oneThirdUpgradedTestRunner") oneThirdUpgradedTestRunner.configure { @@ -85,7 +85,7 @@ for (Version version : bwcVersions.wireCompatible) { configureUpgradeCluster("twoThirdsUpgradedTestCluster", oneThirdUpgradedTestRunner, 1, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oldClusterTest.nodes.get(2).transportUri() + ',' + oneThirdUpgradedTest.nodes.get(0).transportUri() }) + { [oldClusterTest.nodes.get(2).transportUri(), oneThirdUpgradedTest.nodes.get(0).transportUri()] }) Task twoThirdsUpgradedTestRunner = tasks.getByName("${baseName}#twoThirdsUpgradedTestRunner") twoThirdsUpgradedTestRunner.configure { @@ -98,7 +98,7 @@ for (Version version : bwcVersions.wireCompatible) { configureUpgradeCluster("upgradedClusterTestCluster", twoThirdsUpgradedTestRunner, 2, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oneThirdUpgradedTest.nodes.get(0).transportUri() + ',' + twoThirdsUpgradedTest.nodes.get(0).transportUri() }) + { [oneThirdUpgradedTest.nodes.get(0).transportUri(), twoThirdsUpgradedTest.nodes.get(0).transportUri()] }) Task upgradedClusterTestRunner = tasks.getByName("${baseName}#upgradedClusterTestRunner") upgradedClusterTestRunner.configure { diff --git a/x-pack/qa/rolling-upgrade/build.gradle b/x-pack/qa/rolling-upgrade/build.gradle index 10fa3a09d66b0..abf5332351ecf 100644 --- a/x-pack/qa/rolling-upgrade/build.gradle +++ b/x-pack/qa/rolling-upgrade/build.gradle @@ -186,7 +186,7 @@ subprojects { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" setupCommand 'setupTestUser', 'bin/elasticsearch-users', 'useradd', 'test_user', '-p', 'x-pack-test-password', '-r', 'superuser' clusterName = 'rolling-upgrade' - unicastTransportUri = { seedNode, node, ant -> unicastSeed() } + manualSeedUris = { unicastSeed() } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } @@ -221,7 +221,7 @@ subprojects { configureUpgradeCluster("oneThirdUpgradedTestCluster", oldClusterTestRunner, 0, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oldClusterTest.nodes.get(1).transportUri() + ',' + oldClusterTest.nodes.get(2).transportUri() }) + { [oldClusterTest.nodes.get(1).transportUri(), oldClusterTest.nodes.get(2).transportUri()] }) Task oneThirdUpgradedTestRunner = tasks.getByName("${baseName}#oneThirdUpgradedTestRunner") oneThirdUpgradedTestRunner.configure { @@ -240,7 +240,7 @@ subprojects { configureUpgradeCluster("twoThirdsUpgradedTestCluster", oneThirdUpgradedTestRunner, 1, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oldClusterTest.nodes.get(2).transportUri() + ',' + oneThirdUpgradedTest.nodes.get(0).transportUri() }) + { [oldClusterTest.nodes.get(2).transportUri(), oneThirdUpgradedTest.nodes.get(0).transportUri()] }) Task twoThirdsUpgradedTestRunner = tasks.getByName("${baseName}#twoThirdsUpgradedTestRunner") twoThirdsUpgradedTestRunner.configure { @@ -253,7 +253,7 @@ subprojects { configureUpgradeCluster("upgradedClusterTestCluster", twoThirdsUpgradedTestRunner, 2, // Use all running nodes as seed nodes so there is no race between pinging and the tests - { oneThirdUpgradedTest.nodes.get(0).transportUri() + ',' + twoThirdsUpgradedTest.nodes.get(0).transportUri() }) + { [oneThirdUpgradedTest.nodes.get(0).transportUri(), twoThirdsUpgradedTest.nodes.get(0).transportUri()] }) Task upgradedClusterTestRunner = tasks.getByName("${baseName}#upgradedClusterTestRunner") upgradedClusterTestRunner.configure { From 319c45b676d48b5d8bd051b1858d0087af905e69 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Thu, 8 Nov 2018 17:17:44 +0100 Subject: [PATCH 3/5] typo --- .../org/elasticsearch/gradle/test/ClusterConfiguration.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy index fa34b7ad716fc..2394d3b2dcabb 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy @@ -111,7 +111,7 @@ class ClusterConfiguration { } /** - * A close to call which returns a manually supplied list of unicast seed hosts. + * A closure to call which returns a manually supplied list of unicast seed hosts. */ @Input Closure> manualSeedUris = { From 358fb428a2336f89a33a8dc10441faced7e7b5d3 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Thu, 8 Nov 2018 20:02:15 +0100 Subject: [PATCH 4/5] CR: Renamings + merging unicast hosts lists --- .../gradle/test/ClusterConfiguration.groovy | 2 +- .../gradle/test/ClusterFormationTasks.groovy | 12 ++++-------- qa/rolling-upgrade/build.gradle | 3 ++- x-pack/qa/rolling-upgrade-basic/build.gradle | 3 ++- x-pack/qa/rolling-upgrade/build.gradle | 3 ++- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy index 2394d3b2dcabb..fa3db32e6a0c8 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy @@ -114,7 +114,7 @@ class ClusterConfiguration { * A closure to call which returns a manually supplied list of unicast seed hosts. */ @Input - Closure> manualSeedUris = { + Closure> otherUnicastHostAddresses = { Collections.emptyList() } diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index 99442ab390ca1..d2b4d6b3e4c9f 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -716,14 +716,10 @@ class ClusterFormationTasks { Collection unicastHosts = new HashSet<>() nodes.forEach { node -> - List manualSeedUris = node.config.manualSeedUris.call() - if (manualSeedUris.empty == false) { - unicastHosts.addAll(manualSeedUris) - } else { - String unicastHost = node.config.unicastTransportUri(node, null, project.ant) - if (unicastHost != null) { - unicastHosts.addAll(Arrays.asList(unicastHost.split(","))) - } + unicastHosts.addAll(node.config.otherUnicastHostAddresses.call()) + String unicastHost = node.config.unicastTransportUri(node, null, project.ant) + if (unicastHost != null) { + unicastHosts.addAll(Arrays.asList(unicastHost.split(","))) } } String unicastHostsTxt = String.join("\n", unicastHosts) diff --git a/qa/rolling-upgrade/build.gradle b/qa/rolling-upgrade/build.gradle index f282ccf5c1422..c9fb6c4bba043 100644 --- a/qa/rolling-upgrade/build.gradle +++ b/qa/rolling-upgrade/build.gradle @@ -76,7 +76,8 @@ for (Version version : bwcVersions.wireCompatible) { configure(extensions.findByName("${baseName}#${name}")) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" clusterName = 'rolling-upgrade' - manualSeedUris = { unicastSeed() } + otherUnicastHostAddresses = { unicastSeed() } + minimumMasterNodes = { 2 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } diff --git a/x-pack/qa/rolling-upgrade-basic/build.gradle b/x-pack/qa/rolling-upgrade-basic/build.gradle index cf0cfb49a5fb6..47f8d93a06a02 100644 --- a/x-pack/qa/rolling-upgrade-basic/build.gradle +++ b/x-pack/qa/rolling-upgrade-basic/build.gradle @@ -54,7 +54,8 @@ for (Version version : bwcVersions.wireCompatible) { configure(extensions.findByName("${baseName}#${name}")) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" clusterName = 'rolling-upgrade-basic' - manualSeedUris = { unicastSeed() } + otherUnicastHostAddresses = { unicastSeed() } + minimumMasterNodes = { 2 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } diff --git a/x-pack/qa/rolling-upgrade/build.gradle b/x-pack/qa/rolling-upgrade/build.gradle index abf5332351ecf..bc8b43537d390 100644 --- a/x-pack/qa/rolling-upgrade/build.gradle +++ b/x-pack/qa/rolling-upgrade/build.gradle @@ -186,7 +186,8 @@ subprojects { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" setupCommand 'setupTestUser', 'bin/elasticsearch-users', 'useradd', 'test_user', '-p', 'x-pack-test-password', '-r', 'superuser' clusterName = 'rolling-upgrade' - manualSeedUris = { unicastSeed() } + otherUnicastHostAddresses = { unicastSeed() } + minimumMasterNodes = { 2 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ dataDir = { nodeNumber -> oldClusterTest.nodes[stopNode].dataDir } From f79e04994ad80492ca887e3a2750c4f227b9fa2b Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Thu, 8 Nov 2018 20:38:41 +0100 Subject: [PATCH 5/5] CR: Renaming --- qa/rolling-upgrade/build.gradle | 4 ++-- x-pack/qa/rolling-upgrade-basic/build.gradle | 4 ++-- x-pack/qa/rolling-upgrade/build.gradle | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qa/rolling-upgrade/build.gradle b/qa/rolling-upgrade/build.gradle index c9fb6c4bba043..a75b906e12324 100644 --- a/qa/rolling-upgrade/build.gradle +++ b/qa/rolling-upgrade/build.gradle @@ -72,11 +72,11 @@ for (Version version : bwcVersions.wireCompatible) { systemProperty 'tests.rest.suite', 'old_cluster' } - Closure configureUpgradeCluster = {String name, Task lastRunner, int stopNode, Closure unicastSeed -> + Closure configureUpgradeCluster = {String name, Task lastRunner, int stopNode, Closure getOtherUnicastHostAddresses -> configure(extensions.findByName("${baseName}#${name}")) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" clusterName = 'rolling-upgrade' - otherUnicastHostAddresses = { unicastSeed() } + otherUnicastHostAddresses = { getOtherUnicastHostAddresses() } minimumMasterNodes = { 2 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ diff --git a/x-pack/qa/rolling-upgrade-basic/build.gradle b/x-pack/qa/rolling-upgrade-basic/build.gradle index 47f8d93a06a02..da070850864f5 100644 --- a/x-pack/qa/rolling-upgrade-basic/build.gradle +++ b/x-pack/qa/rolling-upgrade-basic/build.gradle @@ -50,11 +50,11 @@ for (Version version : bwcVersions.wireCompatible) { systemProperty 'tests.rest.suite', 'old_cluster' } - Closure configureUpgradeCluster = {String name, Task lastRunner, int stopNode, Closure unicastSeed -> + Closure configureUpgradeCluster = {String name, Task lastRunner, int stopNode, Closure getOtherUnicastHostAddresses -> configure(extensions.findByName("${baseName}#${name}")) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" clusterName = 'rolling-upgrade-basic' - otherUnicastHostAddresses = { unicastSeed() } + otherUnicastHostAddresses = { getOtherUnicastHostAddresses() } minimumMasterNodes = { 2 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */ diff --git a/x-pack/qa/rolling-upgrade/build.gradle b/x-pack/qa/rolling-upgrade/build.gradle index bc8b43537d390..8a3a322efcc90 100644 --- a/x-pack/qa/rolling-upgrade/build.gradle +++ b/x-pack/qa/rolling-upgrade/build.gradle @@ -181,12 +181,12 @@ subprojects { systemProperty 'tests.rest.suite', 'old_cluster' } - Closure configureUpgradeCluster = {String name, Task lastRunner, int stopNode, Closure unicastSeed -> + Closure configureUpgradeCluster = {String name, Task lastRunner, int stopNode, Closure getOtherUnicastHostAddresses -> configure(extensions.findByName("${baseName}#${name}")) { dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" setupCommand 'setupTestUser', 'bin/elasticsearch-users', 'useradd', 'test_user', '-p', 'x-pack-test-password', '-r', 'superuser' clusterName = 'rolling-upgrade' - otherUnicastHostAddresses = { unicastSeed() } + otherUnicastHostAddresses = { getOtherUnicastHostAddresses() } minimumMasterNodes = { 2 } /* Override the data directory so the new node always gets the node we * just stopped's data directory. */