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
This commit is contained in:
gecong1973 2017-09-13 18:46:47 -07:00 committed by gecong
parent b2d9b90499
commit 8cf44f278b
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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