/etc/init.d/garb requires nc and produces an nc error if no cluster nodes are up

Bug #1341028 reported by Nirbhay Choubey on 2014-07-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Galera
Undecided
Unassigned

Bug Description

Originally logged here : https://mariadb.atlassian.net/browse/MDEV-6432

Suggested patch :

=== modified file 'garb/files/garb.sh'
--- garb/files/garb.sh 2013-08-23 13:12:53 +0000
+++ garb/files/garb.sh 2014-07-12 00:02:22 +0000
@@ -116,10 +116,12 @@

        # Find a working node
        for ADDRESS in ${GALERA_NODES} 0; do
- 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 [ ${ADDRESS} != "0" ]; then
+ 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
+ fi
        done
        if [ ${ADDRESS} == "0" ]; then
                log_failure "None of the nodes in $GALERA_NODES is accessible"

=== modified file 'scripts/packages/galera.spec'
--- scripts/packages/galera.spec 2014-04-07 23:11:07 +0000
+++ scripts/packages/galera.spec 2014-07-11 21:50:29 +0000
@@ -34,7 +34,7 @@
 Vendor: Codership Oy
 Provides: %{name} wsrep
 Obsoletes: %{name}
-Requires: chkconfig
+Requires: chkconfig nc
 #Requires: boost-program-options
 # BuildRequires: scons check boost-devel
 # This will be rm -rf

Nirbhay Choubey (nirbhay) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers