Author: aconway
Date: Fri Jul 18 20:17:08 2014
New Revision: 1611790

URL: http://svn.apache.org/r1611790
Log:
QPID-5719: HA becomes unresponsive once any of the brokers are SIGSTOPed

Fixed typo in qpidd script that was causing this not to work if a backup
was SIGSTOPed.

Also fixed bug where data-dir setting in qpidd.conf was being ignored.

Modified:
    qpid/trunk/qpid/cpp/etc/qpidd.in

Modified: qpid/trunk/qpid/cpp/etc/qpidd.in
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/etc/qpidd.in?rev=1611790&r1=1611789&r2=1611790&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/etc/qpidd.in (original)
+++ qpid/trunk/qpid/cpp/etc/qpidd.in Fri Jul 18 20:17:08 2014
@@ -50,6 +50,9 @@ QPID_HA_OPTIONS="--config $QPID_CONFIG"
 test -f @sysconfdir@/sysconfig/$prog && source @sysconfdir@/sysconfig/$prog
 source /etc/rc.d/init.d/functions
 
+# Data dir: respect the config file if set.
+grep -q '^ *data-dir *=' $QPID_CONFIG || QPIDD_OPTIONS="$QPIDD_OPTIONS 
--data-dir=$QPID_DATA_DIR"
+
 # Check presence of executables/scripts
 for f in $QPID_BIN; do
     test -x $f || { echo "$f not found or not executable"; exit 5; }
@@ -73,12 +76,21 @@ fi
 
 do_status() {
     # Check PID file and ping for liveness
-    status $prog && $qpid_ping
+    MESSAGE=$(status $prog) || {
+       RC=$?
+       echo $MESSAGE
+       return $RC
+    }
+    qpid_ping || {
+       return 1
+    }
+    echo $MESSAGE
+    return 0
 }
 
 start() {
         echo -n $"Starting Qpid AMQP daemon: "
-       daemon --pidfile $pidfile --check $prog --user qpidd $QPID_BIN --config 
$QPID_CONFIG --data-dir $QPID_DATA_DIR --daemon $QPIDD_OPTIONS
+       daemon --pidfile $pidfile --check $prog --user qpidd $QPID_BIN --config 
$QPID_CONFIG --daemon $QPIDD_OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch $lockfile



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to