diff options
| author | Alan Conway <aconway@apache.org> | 2008-09-05 16:30:03 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-09-05 16:30:03 +0000 |
| commit | f26c2d31e51044712b7df93a0f4f587af8169213 (patch) | |
| tree | 50f845b060e169bf587ea326eba1b14cb03ad464 /qpid/cpp/src/tests/start_cluster_hosts | |
| parent | 6c3647858be91b75c03498563071b91fd612b082 (diff) | |
| download | qpid-python-f26c2d31e51044712b7df93a0f4f587af8169213.tar.gz | |
src/qpid/client/SubscriptionManager.cpp: added start().
src/tests* improvements to multi-host test scripts.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@692478 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/start_cluster_hosts')
| -rwxr-xr-x | qpid/cpp/src/tests/start_cluster_hosts | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/qpid/cpp/src/tests/start_cluster_hosts b/qpid/cpp/src/tests/start_cluster_hosts index 1c32247050..37dda882ca 100755 --- a/qpid/cpp/src/tests/start_cluster_hosts +++ b/qpid/cpp/src/tests/start_cluster_hosts @@ -6,36 +6,45 @@ # Arguments: [-k] [-p port] HOST [HOST...] # -p port to start broker on, can be 0. Actual ports recorded in cluster.addr. # -k kill any qpidd processes owned by this user before starting. -# Start a broker on each named host. Name a host twice to start multiple brokers. # -# You must be able to ssh to each host and have primary group ais. -# qpidd must exist in the same directory `pwd`/.. as on this host. +# Start a broker on each named host. Name a host twice to start multiple brokers. # +# You must be able to ssh to each host and be in group ais. +# $QPIDD must be executable on each host. +# Logs go to syslog on each host, with a unique prefix per broker. +# -ADDR_FILE=cluster.addr +QPIDD=${QPIDD:-$PWD/../qpidd} +LIBQPIDCLUSTER=${LIBQPIDCLUSTER:-$PWD/../.libs/libqpidcluster.so} +CLUSTER=$USER # User name is default cluster name. +RESTART=NO -while getopts "kp:" ARG ; do +while getopts "kp:c:q:r" ARG ; do case $ARG in - k) KILL=yes ; rm -f $ADDR_FILE ;; + k) KILL=yes ;; p) PORT="$OPTARG" ;; + c) CLUSTER=$OPTARG ;; + q) QPIDD=$OPTARG ;; + l) LIBQPIDCLUSTER=$OPTARG ;; + r) RESTART=yes ;; *) echo "Error parsing options: $ARG"; exit 1 ;; esac done shift `expr $OPTIND - 1` test -n "$PORT" && PORTOPT="-p $PORT" -test -n $KILL && KILL="../qpidd -q $PORTOPT ;" - +test "$KILL" = yes && KILL="$QPIDD -q $PORTOPT ;" test -z "$*" && { echo Must specify at least one host; exit 1; } -test -f $ADDR_FILE && { echo "$ADDR_FILE file already exists" ; exit 1; } -CLUSTER=$USER # User name is cluster name. -OPTS="-d $PORTOPT --load-module ../.libs/libqpidcluster.so --cluster-name=$CLUSTER --no-data-dir --auth=no --log-output=syslog" + + +OPTS="-d $PORTOPT --load-module $LIBQPIDCLUSTER --cluster-name=$CLUSTER --no-data-dir --auth=no --log-output=syslog" num=0 for h in $*; do num=`expr $num + 1` # Give a unique log prefix to each node. - cmd="cd $PWD; $KILL ../qpidd $OPTS --log-prefix $num.$h" - out=`ssh $h "$cmd"` || { echo $out ; exit 1; } + cmd="$KILL $QPIDD $OPTS --log-prefix $num.$h" + echo == $h + out=`echo "$cmd" | ssh $h newgrp ais` || { echo $out ; exit 1; } if [ "$PORT" = 0 ] ; then p=$out; else p=$PORT; fi - echo "$h $p" | tee -a $ADDR_FILE + echo "$h $p" done |
