diff options
| author | Harm Weites <harm@weites.com> | 2015-07-10 20:44:04 +0200 |
|---|---|---|
| committer | Harm Weites <harm@weites.com> | 2015-07-10 20:47:08 +0200 |
| commit | aef25bbaa84e7d490681e4aeeda08f07b3af1ab4 (patch) | |
| tree | 77fcc3125ae68a0f378f54b641acda10e16e7f9d | |
| parent | bd1e41a7679f618392dfeac1f953ccfa61fb70d6 (diff) | |
| download | kolla-aef25bbaa84e7d490681e4aeeda08f07b3af1ab4.tar.gz kolla-aef25bbaa84e7d490681e4aeeda08f07b3af1ab4.zip | |
Properly wait for Openstack services to be ready
Just checking for an account in keystone is pointless since nova and
neutron take way more time before they are fully operational. If the user
would continue as tools/kolla suggests, the init-runonce script would
fail because either nova or neutron would not be ready for service.
Change-Id: I8fbfaa16d961b418b9ac6a34d311adb8e41b61e9
Closes-bug: #1471331
| -rwxr-xr-x | tools/kolla | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/kolla b/tools/kolla index 62193d9d9..f26aaf801 100755 --- a/tools/kolla +++ b/tools/kolla @@ -75,12 +75,18 @@ function pre_start { } function post_start { - until keystone user-list | grep glance; do - echo "Waiting for OpenStack services to become available" + echo -n "Waiting for OpenStack services to become available" + + until [ $(nova service-list 2>&1 | grep -c enabled) -ge 4 ]; do + echo -n . sleep 2 done - sleep 3 + until [ $(neutron agent-list 2>&1 | grep -c ':-)') -ge 4 ]; do + echo -n . + sleep 2 + done + echo " done" echo Example Usage: echo source openrc # source keystone credentials |
