Comment 4 for bug 1349384

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

 diff --git a/garb/files/garb.sh b/garb/files/garb.sh
 index 66d2d94..66df2a1 100755
 --- a/garb/files/garb.sh
 +++ b/garb/files/garb.sh
 @@ -124,7 +124,14 @@ start() {
                 HOST=$(echo $ADDRESS | cut -d \: -f 1 )
                 PORT=$(echo $ADDRESS | cut -d \: -f 2 )
                 PORT=${PORT:-$GALERA_PORT}
 - nc -z $HOST $PORT >/dev/null && break
 + if nc -h 2>&1 | grep -q -- '-z';then
 + nc -z $HOST $PORT >/dev/null && break
 + elif [[ -x `which nmap` ]];then
 + nmap -Pn -p$PORT $HOST | grep -q 'Host is up' && break
 + else
 + log_failure "Neither netcat nor nmap are present for zero I/O scanning"
 + return 1
 + fi
         done
         if [ ${ADDRESS} == "0" ]; then
                 log_failure "None of the nodes in $GALERA_NODES is accessible"