aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamYaple <sam@yaple.net>2016-03-04 16:01:07 +0000
committerSamYaple <sam@yaple.net>2016-03-04 18:14:33 +0000
commitd83cb3c47317766e2cdc05942e2b1c8c288c53a1 (patch)
tree6763714381cea64c11e2b4d09993ea4b5929e7b6
parente72c8f11472ce30adf02d0c39d6de144ac9b4fc7 (diff)
downloadkolla-d83cb3c47317766e2cdc05942e2b1c8c288c53a1.tar.gz
kolla-d83cb3c47317766e2cdc05942e2b1c8c288c53a1.zip
Retry token retrival in keystone bootstrap script
TrivialFix Change-Id: I83da0298067d5f37603c52fb312828ea1fbbb00c
-rw-r--r--docker/keystone/keystone_bootstrap.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/docker/keystone/keystone_bootstrap.sh b/docker/keystone/keystone_bootstrap.sh
index 15c1838db..0c0aa498d 100644
--- a/docker/keystone/keystone_bootstrap.sh
+++ b/docker/keystone/keystone_bootstrap.sh
@@ -73,10 +73,16 @@ if [[ ! $(openstack --os-identity-api-version 3 --os-token "${OS_TOKEN}" --os-ur
)
fi
-get_token
+count=0
+while [[ ! "${OS_TOKEN}" && "${count}" -lt 5 ]]; do
+ get_token
+ ((count++))
+ sleep 1
+done
if [[ ! "${OS_TOKEN}" ]]; then
- fail_json "Unable to issue token"
+ fail_json "Unable to retrieve token after 5 attempts"
fi
+
create_service
create_endpoints
exit_json