Browse code

BM-15288 Fix: hazelcast check

Anthony Prades authored on 24/10/2019 09:49:19
Showing 1 changed files
... ...
@@ -7,8 +7,13 @@ source ${WORKSPACE}"/check.lib"
7 7
 
8 8
 installationId="72D26E8A-5BB1-48A4-BC71-EEE92E0CE4EE"
9 9
 
10
-state=$(curl --silent --connect-timeout 5 --data "bluemind-${installationId}&dev-pass" http://$(hostname -i):5701/hazelcast/rest/management/cluster/state)
11
-result=$?
10
+# Must listen on a least one network interface
11
+for hostIp in $(hostname -I); do
12
+    state=$(curl --silent --connect-timeout 5 --data "bluemind-${installationId}&dev-pass" http://${hostIp}:5701/hazelcast/rest/management/cluster/state)
13
+    result=$?
14
+    
15
+    [[ "${result}" == 0 ]] && break
16
+done
12 17
 
13 18
 if [[ "$result" > 0 ]]
14 19
   then