From d8589fa01a57feccc2d20a72307098b7e3eeb1d3 Mon Sep 17 00:00:00 2001 From: Brant Knudson Date: Mon, 22 Feb 2016 13:49:52 -0600 Subject: [PATCH] Fix uwsgi keystone The uwsgi keystone jobs are failing with an error like + devstack/functions-common:_run_process:L1391: setsid uwsgi /etc/keystone/keystone-uwsgi-admin.ini + devstack/functions-common:_run_process:L1395: exit 0 execvp: No such file or directory I think this is because uwsgi isn't installed on the images. The fix is to pip install it. Also, use the full path to the uwsgi executable (even though execvp is used) because eventlet (calling keystone-all) does. Also, the uwsgi process wasn't shutting down on ./unstack.sh. This is worked around by not running master process. Change-Id: Id02e16c5149ba3dfa13051e87cfccd8e505b7362 --- lib/keystone | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/keystone b/lib/keystone index 7d5fd41f89..1cb3737037 100644 --- a/lib/keystone +++ b/lib/keystone @@ -303,7 +303,6 @@ function configure_keystone { iniset "$KEYSTONE_PUBLIC_UWSGI_FILE" uwsgi wsgi-file "$KEYSTONE_BIN_DIR/keystone-wsgi-public" # This is running standalone - iniset "$KEYSTONE_PUBLIC_UWSGI_FILE" uwsgi master true iniset "$KEYSTONE_PUBLIC_UWSGI_FILE" uwsgi threads $(nproc) iniset "$KEYSTONE_PUBLIC_UWSGI_FILE" uwsgi enable-threads true iniset "$KEYSTONE_PUBLIC_UWSGI_FILE" uwsgi plugins python @@ -316,7 +315,6 @@ function configure_keystone { iniset "$KEYSTONE_ADMIN_UWSGI_FILE" uwsgi wsgi-file "$KEYSTONE_BIN_DIR/keystone-wsgi-admin" # This is running standalone - iniset "$KEYSTONE_ADMIN_UWSGI_FILE" uwsgi master true iniset "$KEYSTONE_ADMIN_UWSGI_FILE" uwsgi threads $API_WORKERS iniset "$KEYSTONE_ADMIN_UWSGI_FILE" uwsgi enable-threads true iniset "$KEYSTONE_ADMIN_UWSGI_FILE" uwsgi plugins python @@ -563,6 +561,8 @@ function install_keystone { if is_ssl_enabled_service "key"; then enable_mod_ssl fi + elif [ "$KEYSTONE_DEPLOY" == "uwsgi" ]; then + pip_install uwsgi fi } @@ -582,8 +582,8 @@ function start_keystone { tail_log key /var/log/$APACHE_NAME/keystone.log tail_log key-access /var/log/$APACHE_NAME/keystone_access.log elif [ "$KEYSTONE_DEPLOY" == "uwsgi" ]; then - run_process key "uwsgi $KEYSTONE_PUBLIC_UWSGI_FILE" "" "key-p" - run_process key "uwsgi $KEYSTONE_ADMIN_UWSGI_FILE" "" "key-a" + run_process key "$KEYSTONE_BIN_DIR/uwsgi $KEYSTONE_PUBLIC_UWSGI_FILE" "" "key-p" + run_process key "$KEYSTONE_BIN_DIR/uwsgi $KEYSTONE_ADMIN_UWSGI_FILE" "" "key-a" else # eventlet # Start Keystone in a screen window run_process key "$KEYSTONE_BIN_DIR/keystone-all --config-file $KEYSTONE_CONF"