1
0
Fork 0

moves -e to XTERMOPTIONS and adds delay (#5297)

* moves -e to XTERMOPTIONS and adds delay
* add delay only when rr is used
This commit is contained in:
Jan Christoph Uhde 2018-06-01 10:07:59 +02:00 committed by Max Neunhöffer
parent 6fdc811c41
commit 2829b3e77d
2 changed files with 12 additions and 10 deletions

View File

@ -24,7 +24,7 @@ function help() {
echo " $0"
echo " $0 -a 1 -c 1 -d 3 -t ssl"
echo " $0 -a 3 -c 1 -d 2 -t tcp -i C"
}
# defaults
@ -40,7 +40,7 @@ if [ -z "$XTERM" ] ; then
XTERM="x-terminal-emulator"
fi
if [ -z "$XTERMOPTIONS" ] ; then
XTERMOPTIONS="--geometry=80x43"
XTERMOPTIONS=" --geometry=80x43 -e "
fi
BUILD="./build"
JWT_SECRET=""
@ -104,7 +104,7 @@ while [[ -n "$1" ]]; do
;;
-h|--help)
help
exit 1
exit 1
;;
-B|--build)
BUILD=${2}
@ -120,7 +120,7 @@ while [[ -n "$1" ]]; do
exit 1
;;
esac
if ! shift; then
echo 'Missing parameter argument.' >&2
return 1

View File

@ -41,7 +41,7 @@ if [[ -f cluster/startup_parameters ]];then
else
#store parmeters
if [[ -n "${params[@]}" ]]; then
echo "${params[@]}" > cluster/startup_parameters
echo "${params[@]}" > cluster/startup_parameters
fi
fi
@ -111,10 +111,10 @@ fi
if [ ! -z "$INTERACTIVE_MODE" ] ; then
if [ "$INTERACTIVE_MODE" == "C" ] ; then
ARANGOD="${BUILD}/bin/arangod "
CO_ARANGOD="$XTERM $XTERMOPTIONS -e ${BUILD}/bin/arangod --console "
CO_ARANGOD="$XTERM $XTERMOPTIONS ${BUILD}/bin/arangod --console "
echo "Starting one coordinator in terminal with --console"
elif [ "$INTERACTIVE_MODE" == "R" ] ; then
ARANGOD="$XTERM $XTERMOPTIONS -e rr ${BUILD}/bin/arangod --console "
ARANGOD="$XTERM $XTERMOPTIONS rr ${BUILD}/bin/arangod --console "
CO_ARANGOD=$ARANGOD
echo Running cluster in rr with --console.
fi
@ -123,8 +123,9 @@ else
CO_ARANGOD=$ARANGOD
fi
echo == Starting agency ...
echo == Starting agency ...
for aid in `seq 0 $(( $NRAGENTS - 1 ))`; do
[ "$INTERACTIVE_MODE" == "R" ] && sleep 1
port=$(( $AG_BASE + $aid ))
AGENCY_ENDPOINTS+="--cluster.agency-endpoint $TRANSPORT://$ADDRESS:$port "
$ARANGOD \
@ -155,7 +156,7 @@ for aid in `seq 0 $(( $NRAGENTS - 1 ))`; do
done
start() {
if [ "$1" == "dbserver" ]; then
ROLE="PRIMARY"
elif [ "$1" == "coordinator" ]; then
@ -170,8 +171,9 @@ start() {
TYPE=$1
PORT=$2
mkdir -p cluster/data$PORT cluster/apps$PORT
mkdir -p cluster/data$PORT cluster/apps$PORT
echo == Starting $TYPE on port $PORT
[ "$INTERACTIVE_MODE" == "R" ] && sleep 1
$CMD \
-c none \
--database.directory cluster/data$PORT \