From 8cf44f278b4c1f33cb10a790c49687a441f3563f Mon Sep 17 00:00:00 2001 From: gecong1973 Date: Wed, 13 Sep 2017 18:46:47 -0700 Subject: [PATCH] Fix gate-grenade jenkins failure The grenade gate sometimes fails with "keystone did not start". this patch fix it in grenade log, there are log as follows: curl -g -k --noproxy '*' -s -o /dev/null -w '%{http_code}' http://172.99.67.72:5000/v3/ wait_for_keystone:69 : die 69 'keystone did not start' actually, KEYSTONE_AUTH_URI should be http://172.99.67.72/identity/v3 instead of http://172.99.67.72:5000/v3/ which leads to keystone failure Change-Id: I116e46ed30f6ce0fbc7b9207cc4f519438df8bc2 --- devstack/plugin.sh | 5 +++-- devstack/upgrade/upgrade.sh | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 9d3a9b074..21c9c590c 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -228,7 +228,7 @@ function install_zaqarui { # Remove following two 'mv' commands when mentioned bug is fixed. mv $ZAQARUI_DIR/test-requirements.txt $ZAQARUI_DIR/_test-requirements.txt setup_develop $ZAQARUI_DIR - mv $ZAQARUI_DIR/_test-requirements.txt $ZAQARUI_DIR/test-requirements.txt + mv $ZAQARUI_DIR/_test-requirements.txt $ZAQARUI_DIR/test-requirements.txt cp -a $ZAQARUI_DIR/zaqar_ui/enabled/* $HORIZON_DIR/openstack_dashboard/local/enabled/ if [ -d $ZAQARUI_DIR/zaqar-ui/locale ]; then (cd $ZAQARUI_DIR/zaqar-ui; DJANGO_SETTINGS_MODULE=openstack_dashboard.settings ../manage.py compilemessages) @@ -251,7 +251,8 @@ function start_zaqar { run_process zaqar-websocket "$ZAQAR_BIN_DIR/zaqar-server --config-file $ZAQAR_CONF" echo "Waiting for Zaqar to start..." - token=$(openstack token issue -c id -f value) + local auth_uri=http://${ZAQAR_SERVICE_HOST}/identity + token=$(openstack token issue -c id -f value --os-auth-url ${auth_uri}) if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q --header=\"Client-ID:$(uuidgen)\" --header=\"X-Auth-Token:$token\" -O- $ZAQAR_SERVICE_PROTOCOL://$ZAQAR_SERVICE_HOST:$ZAQAR_SERVICE_PORT/v2/ping; do sleep 1; done"; then die $LINENO "Zaqar did not start" fi diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh index 6fc24df80..a9f3aa6ac 100755 --- a/devstack/upgrade/upgrade.sh +++ b/devstack/upgrade/upgrade.sh @@ -65,7 +65,8 @@ source $ZAQAR_DEVSTACK_DIR/plugin.sh set -o xtrace function wait_for_keystone { - if ! wait_for_service $SERVICE_TIMEOUT ${KEYSTONE_AUTH_URI}/v$IDENTITY_API_VERSION/; then + local auth_uri=http://${ZAQAR_SERVICE_HOST}/identity + if ! wait_for_service $SERVICE_TIMEOUT ${auth_uri}/v$IDENTITY_API_VERSION/; then die $LINENO "keystone did not start" fi } @@ -82,8 +83,8 @@ fi # calls upgrade-zaqar for specific release upgrade_project zaqar $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH -start_zaqar wait_for_keystone +start_zaqar # Don't succeed unless the services come up