Merge "Correctly stop uwsgi process during unstack.sh"

This commit is contained in:
Jenkins 2015-11-10 16:49:34 +00:00 committed by Gerrit Code Review
commit 1ef07f3b6e

View File

@ -39,6 +39,7 @@ ZAQAR_CONF_DIR=/etc/zaqar
ZAQAR_CONF=$ZAQAR_CONF_DIR/zaqar.conf ZAQAR_CONF=$ZAQAR_CONF_DIR/zaqar.conf
ZAQAR_POLICY_CONF=$ZAQAR_CONF_DIR/policy.json ZAQAR_POLICY_CONF=$ZAQAR_CONF_DIR/policy.json
ZAQAR_UWSGI_CONF=$ZAQAR_CONF_DIR/uwsgi.conf ZAQAR_UWSGI_CONF=$ZAQAR_CONF_DIR/uwsgi.conf
ZAQAR_UWSGI_MASTER_PIDFILE=/tmp/uwsgizaqarmasterprocess.pid
ZAQAR_API_LOG_DIR=/var/log/zaqar ZAQAR_API_LOG_DIR=/var/log/zaqar
ZAQAR_API_LOG_FILE=$ZAQAR_API_LOG_DIR/queues.log ZAQAR_API_LOG_FILE=$ZAQAR_API_LOG_DIR/queues.log
ZAQAR_AUTH_CACHE_DIR=${ZAQAR_AUTH_CACHE_DIR:-/var/cache/zaqar} ZAQAR_AUTH_CACHE_DIR=${ZAQAR_AUTH_CACHE_DIR:-/var/cache/zaqar}
@ -238,7 +239,7 @@ function install_zaqarclient {
# start_zaqar() - Start running processes, including screen # start_zaqar() - Start running processes, including screen
function start_zaqar { function start_zaqar {
run_process zaqar-wsgi "uwsgi --ini $ZAQAR_UWSGI_CONF" run_process zaqar-wsgi "uwsgi --ini $ZAQAR_UWSGI_CONF --pidfile2 $ZAQAR_UWSGI_MASTER_PIDFILE"
run_process zaqar-websocket "zaqar-server --config-file $ZAQAR_CONF" run_process zaqar-websocket "zaqar-server --config-file $ZAQAR_CONF"
echo "Waiting for Zaqar to start..." echo "Waiting for Zaqar to start..."
@ -255,6 +256,7 @@ function stop_zaqar {
for serv in zaqar-wsgi zaqar-websocket; do for serv in zaqar-wsgi zaqar-websocket; do
screen -S $SCREEN_NAME -p $serv -X kill screen -S $SCREEN_NAME -p $serv -X kill
done done
uwsgi --stop $ZAQAR_UWSGI_MASTER_PIDFILE
} }
function create_zaqar_accounts { function create_zaqar_accounts {