summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-07-20 09:41:54 +0000
committervarac <varacanero@zeromail.org>2013-07-20 09:41:54 +0000
commit1eb844bda5ea0bc18d960a64bd68d55502e6dc30 (patch)
tree27167653e9edd5c4669aff1ae0152aedee915db6
parentbe032283e49d1fdee6201cdd758f892f27bc3cbd (diff)
try ssh instead of ping to test if nodes are up
-rwxr-xr-xleap-platform-test13
1 files changed, 8 insertions, 5 deletions
diff --git a/leap-platform-test b/leap-platform-test
index 6192d81..bc71d65 100755
--- a/leap-platform-test
+++ b/leap-platform-test
@@ -179,18 +179,21 @@ ip_pingable () {
return $?
}
+ssh_up () {
+ nc -w 4 $1 22 > /dev/null
+ return $?
+}
+
wait_for_node() {
vm=$1
ip=`get_ip $vm`
online=0
- echo "Waiting for VM $vm (IP: $ip) to come up..."
+ echo "Waiting for ssh on VM $vm (IP: $ip) to come up..."
while [ $online -eq 0 ]
do
- ip_pingable $ip && online=1
- sleep 1
+ ssh_up $ip && online=1
+ sleep 1
done
- # wait until ssh is up
- sleep 4
}
update_leap_cli () {