From 9b2c5796edde3da060b2c8fe7849c9114ad7dee2 Mon Sep 17 00:00:00 2001 From: Obulapathi N Challa Date: Mon, 21 Apr 2014 11:43:08 -0400 Subject: [PATCH] Add "daemon" flag to marconi script This patch adds daemon flag to marconi script. This change was needed to run the latest build of marconi-server in background. Since mongodb can not be used with marconi until gate is updated to Ubuntu 14.04, we are changing our backend to sqlite. Change-Id: I1a4148bd545818d5e943257be2f6e752ce43f793 --- lib/marconi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/marconi b/lib/marconi index fd1c35132a..473c8cd5ef 100644 --- a/lib/marconi +++ b/lib/marconi @@ -42,7 +42,7 @@ MARCONI_AUTH_CACHE_DIR=${MARCONI_AUTH_CACHE_DIR:-/var/cache/marconi} MARCONI_BIN_DIR=$(get_python_exec_prefix) # Set up database backend -MARCONI_BACKEND=${MARCONI_BACKEND:-mongodb} +MARCONI_BACKEND=${MARCONI_BACKEND:-sqlite} # Set Marconi repository @@ -109,8 +109,8 @@ function configure_marconi { if [ "$MARCONI_BACKEND" = 'mysql' ] || [ "$MARCONI_BACKEND" = 'postgresql' ] ; then iniset $MARCONI_CONF drivers storage sqlalchemy iniset $MARCONI_CONF 'drivers:storage:sqlalchemy' uri `database_connection_url marconi` - else - iniset $MARCONI_CONF drivers storage mongodb + elif [ "$MARCONI_BACKEND" = 'mongodb' ] ; then + iniset $MARCONI_CONF drivers storage mongodb iniset $MARCONI_CONF 'drivers:storage:mongodb' uri mongodb://localhost:27017/marconi configure_mongodb cleanup_marconi @@ -154,7 +154,7 @@ function install_marconiclient { # start_marconi() - Start running processes, including screen function start_marconi { - screen_it marconi-server "marconi-server --config-file $MARCONI_CONF" + screen_it marconi-server "marconi-server --config-file $MARCONI_CONF --daemon" echo "Waiting for Marconi to start..." if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- $MARCONI_SERVICE_PROTOCOL://$MARCONI_SERVICE_HOST:$MARCONI_SERVICE_PORT/v1/health; do sleep 1; done"; then die $LINENO "Marconi did not start"