@@ -351,8 +351,8 @@ class ClusterFormationTasks {
351
351
// Don't force discovery provider if one is set by the test cluster specs already
352
352
if (esConfig. containsKey(' discovery.zen.hosts_provider' ) == false ) {
353
353
esConfig[' discovery.zen.hosts_provider' ] = ' file'
354
- esConfig[' discovery.zen.ping.unicast.hosts' ] = []
355
354
}
355
+ esConfig[' discovery.zen.ping.unicast.hosts' ] = []
356
356
} else {
357
357
String unicastTransportUri = node. config. unicastTransportUri(seedNode, node, project. ant)
358
358
if (unicastTransportUri == null ) {
@@ -692,17 +692,16 @@ class ClusterFormationTasks {
692
692
Task wait = project. tasks. create(name : name, dependsOn : startTasks)
693
693
wait. doLast {
694
694
695
- nodes. forEach { node ->
696
- Collection<String > unicastHosts = new HashSet<> ()
697
- nodes. forEach { otherNode ->
698
- String unicastHost = node. config. unicastTransportUri(otherNode, node, project. ant)
699
- if (unicastHost != null ) {
700
- unicastHosts. addAll(Arrays . asList(unicastHost. split(" ," )))
701
- }
695
+ Collection<String > unicastHosts = new HashSet<> ()
696
+ nodes. forEach { otherNode ->
697
+ String unicastHost = otherNode. config. unicastTransportUri(otherNode, null , project. ant)
698
+ if (unicastHost != null ) {
699
+ unicastHosts. addAll(Arrays . asList(unicastHost. split(" ," )))
702
700
}
703
- node. pathConf. toPath(). resolve(" unicast_hosts.txt" ). setText(
704
- String . join(" \n " , unicastHosts)
705
- )
701
+ }
702
+ String unicastHostsTxt = String . join(" \n " , unicastHosts)
703
+ nodes. forEach { node ->
704
+ node. pathConf. toPath(). resolve(" unicast_hosts.txt" ). setText(unicastHostsTxt)
706
705
}
707
706
708
707
ant. waitfor(maxwait : " ${ waitSeconds} " , maxwaitunit : ' second' , checkevery : ' 500' , checkeveryunit : ' millisecond' , timeoutproperty : " failed${ name} " ) {
0 commit comments