Skip to content
Snippets Groups Projects
Commit ba175c61 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Simplify `wait_for` calls"

parents 92b12996 056e02d0
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ wait_for() {
if [ -z "$loops" -o -z "$sleeptime" -o -z "$command" ]; then
echo "wait_for is missing a required parameter"
return 1
exit 1
fi
local i=0
......
......@@ -11,11 +11,7 @@ check_required_vars KEYSTONE_ADMIN_TOKEN KEYSTONE_ADMIN_SERVICE_HOST \
ADMIN_TENANT_NAME GLANCE_API_SERVICE_HOST \
PUBLIC_IP
wait_for 30 1 keystone \
--os-auth-url=http://${KEYSTONE_PUBLIC_SERVICE_HOST}:35357/v2.0 \
--os-username=admin --os-tenant-name=${ADMIN_TENANT_NAME} \
--os-password=${KEYSTONE_ADMIN_PASSWORD} endpoint-list
fail_unless_os_service_running keystone
wait_for 30 1 check_for_os_service_running keystone
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
export SERVICE_ENDPOINT="http://${KEYSTONE_ADMIN_SERVICE_HOST}:35357/v2.0"
......
......@@ -7,8 +7,7 @@ set -e
check_required_vars GLANCE_DB_NAME GLANCE_DB_USER GLANCE_DB_PASSWORD
# lets wait for the DB to be available
wait_for 25 1 mysql -h ${MARIADB_SERVICE_HOST} -u root -p"${DB_ROOT_PASSWORD}" -e 'status;'
fail_unless_db
wait_for 25 1 check_for_db
mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
CREATE DATABASE IF NOT EXISTS ${GLANCE_DB_NAME} DEFAULT CHARACTER SET utf8;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment