diff options
| author | Martin André <martin.andre@kvhasia.com> | 2015-03-30 10:14:03 +0900 |
|---|---|---|
| committer | Martin André <martin.andre@kvhasia.com> | 2015-04-01 16:39:44 +0900 |
| commit | 34872c1c2f68f4a410c423ed8b615822a29ff94a (patch) | |
| tree | d68f9b10e68580956a2a3d20f28d8923f255aa25 /docker/glance | |
| parent | cf3086ed3bca797ecc34e9c401951d1d64fe326a (diff) | |
| download | kolla-34872c1c2f68f4a410c423ed8b615822a29ff94a.tar.gz kolla-34872c1c2f68f4a410c423ed8b615822a29ff94a.zip | |
Allow check_for_* functions to be consumed by wait_for
In order for the `check_for_*` functions to be consumed by `wait_for`,
they should notify of their success but not exit.
As a consequence, the previous behavior is restored by the fail_unless_*
companion functions.
With this change, it is now possible to do:
wait_for 30 1 check_for_os_service_running keystone
Change-Id: I16ddf8913027030c3ccb5487713d172904508fd6
Diffstat (limited to 'docker/glance')
| -rwxr-xr-x | docker/glance/glance-api/start.sh | 2 | ||||
| -rwxr-xr-x | docker/glance/glance-registry/start.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docker/glance/glance-api/start.sh b/docker/glance/glance-api/start.sh index 5dd1da5b3..a049b2841 100755 --- a/docker/glance/glance-api/start.sh +++ b/docker/glance/glance-api/start.sh @@ -15,7 +15,7 @@ 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 -check_for_keystone +fail_unless_os_service_running keystone export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" export SERVICE_ENDPOINT="http://${KEYSTONE_ADMIN_SERVICE_HOST}:35357/v2.0" diff --git a/docker/glance/glance-registry/start.sh b/docker/glance/glance-registry/start.sh index c4658d637..9a6271afe 100755 --- a/docker/glance/glance-registry/start.sh +++ b/docker/glance/glance-registry/start.sh @@ -8,7 +8,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;' -check_for_db +fail_unless_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; |
