Fix devstack: replace deprecated screen functions

Since [1], systemd is the default process init. Therefore,
CK devstack plugin still uses screen_it function instead of
generic run_process function. This leads to strange behavior
of the plugin.

This patch fixes this problem.

[1] https://review.openstack.org/#/c/461716/

Story: 2001047
Task: 4634

Change-Id: I57c71c85f2a31cd90afeaf7f32754f1f1a503753
This commit is contained in:
Maxime Cottret 2017-05-30 16:40:44 +02:00
parent 9b14f92357
commit 4734be4ffa
1 changed files with 4 additions and 4 deletions

View File

@ -194,10 +194,10 @@ function install_cloudkitty {
# start_cloudkitty() - Start running processes, including screen
function start_cloudkitty {
screen_it ck-proc "cd $CLOUDKITTY_DIR; $CLOUDKITTY_BIN_DIR/cloudkitty-processor --config-file=$CLOUDKITTY_CONF"
screen_it ck-api "cd $CLOUDKITTY_DIR; $CLOUDKITTY_BIN_DIR/cloudkitty-api --config-file=$CLOUDKITTY_CONF"
run_process ck-proc "$CLOUDKITTY_BIN_DIR/cloudkitty-processor --config-file=$CLOUDKITTY_CONF"
run_process ck-api "$CLOUDKITTY_BIN_DIR/cloudkitty-api --config-file=$CLOUDKITTY_CONF"
echo "Waiting for ck-api ($CLOUDKITTY_SERVICE_HOST:$CLOUDKITTY_SERVICE_PORT) to start..."
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$CLOUDKITTY_SERVICE_HOST:$CLOUDKITTY_SERVICE_PORT; do sleep 1; done"; then
if ! wait_for_service $SERVICE_TIMEOUT $CLOUDKITTY_SERVICE_PROTOCOL://$CLOUDKITTY_SERVICE_HOST:$CLOUDKITTY_SERVICE_PORT; then
die $LINENO "ck-api did not start"
fi
}
@ -206,7 +206,7 @@ function start_cloudkitty {
function stop_cloudkitty {
# Kill the cloudkitty screen windows
for serv in ck-api ck-proc; do
screen_stop $serv
stop_process $serv
done
}