Browse code

Allow wget to handle Non-English output

The stack.sh has a loop to wait for keystone to start. But the output of wget tool has been globalized
which means it won't return the English word 'refused' on Non-English environment even the keystone is
not up. So the script will assume the keystone has been started and continue. The command of keystone
tenant-create always failed immediately after skipping this loop since it require keystone to be started
to authenticate. That's why you can see authentication error in the log because the tenant information
was not correctly set up.

Fix bug 1019942

Change-Id: Icc2bd9551e235173683e3677880c2641faee62a9

Zhang Hua authored on 2012/07/02 14:57:53
Showing 1 changed files
... ...
@@ -2008,7 +2008,7 @@ if is_service_enabled key; then
2008 2008
     # launch keystone and wait for it to answer before continuing
2009 2009
     screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG -d --debug"
2010 2010
     echo "Waiting for keystone to start..."
2011
-    if ! timeout $SERVICE_TIMEOUT sh -c "while http_proxy= wget -O- $KEYSTONE_AUTH_PROTOCOL://$SERVICE_HOST:$KEYSTONE_API_PORT/v2.0/ 2>&1 | grep -q 'refused'; do sleep 1; done"; then
2011
+    if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= curl -s $KEYSTONE_AUTH_PROTOCOL://$SERVICE_HOST:$KEYSTONE_API_PORT/v2.0/ >/dev/null; do sleep 1; done"; then
2012 2012
       echo "keystone did not start"
2013 2013
       exit 1
2014 2014
     fi