diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-09-15 21:47:01 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-10-03 01:15:42 -0400 |
| commit | dbadb25610122f5848d9588d25d7f5b5d797450a (patch) | |
| tree | 7126f01ad8d7a6ce2ed3a84c3ef16853aba4ba1e /meta-openstack/recipes-devtools/python | |
| parent | 7db05c524eeb3aaae3a34544bfb7076ecb71b88d (diff) | |
| download | meta-cloud-services-dbadb25610122f5848d9588d25d7f5b5d797450a.tar.gz | |
python-keystone: improve first run reliability
In cases where the postgresql database wasn't properly started, keystone's
first run setup fails without clear error messages. With this change, we
insert longer sleep periods after attempting to start the database server,
which improves the chances of a proper startup.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-keystone_2013.1.3.bb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_2013.1.3.bb b/meta-openstack/recipes-devtools/python/python-keystone_2013.1.3.bb index 14bfc47..bc30333 100644 --- a/meta-openstack/recipes-devtools/python/python-keystone_2013.1.3.bb +++ b/meta-openstack/recipes-devtools/python/python-keystone_2013.1.3.bb | |||
| @@ -46,7 +46,7 @@ do_install_append() { | |||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | pkg_postinst_${SRCNAME} () { | 48 | pkg_postinst_${SRCNAME} () { |
| 49 | 49 | # python-keystone postinst start | |
| 50 | if [ "x$D" != "x" ]; then | 50 | if [ "x$D" != "x" ]; then |
| 51 | exit 1 | 51 | exit 1 |
| 52 | fi | 52 | fi |
| @@ -54,8 +54,9 @@ pkg_postinst_${SRCNAME} () { | |||
| 54 | # This is to make sure postgres is configured and running | 54 | # This is to make sure postgres is configured and running |
| 55 | if ! pidof postmaster > /dev/null; then | 55 | if ! pidof postmaster > /dev/null; then |
| 56 | sudo -u postgres initdb -D /etc/postgresql/ | 56 | sudo -u postgres initdb -D /etc/postgresql/ |
| 57 | sleep 10 | ||
| 57 | /etc/init.d/postgresql start | 58 | /etc/init.d/postgresql start |
| 58 | sleep 0.2 | 59 | sleep 5 |
| 59 | sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" | 60 | sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" |
| 60 | fi | 61 | fi |
| 61 | 62 | ||
| @@ -63,13 +64,16 @@ pkg_postinst_${SRCNAME} () { | |||
| 63 | keystone-manage db_sync | 64 | keystone-manage db_sync |
| 64 | keystone-manage pki_setup | 65 | keystone-manage pki_setup |
| 65 | 66 | ||
| 66 | #Create users, services and endpoints | 67 | # Create users, services and endpoints |
| 67 | /etc/init.d/keystone start | 68 | /etc/init.d/keystone start |
| 68 | sleep 0.25 | 69 | sleep 2 |
| 70 | |||
| 69 | ADMIN_PASSWORD=${ADMIN_PASSWORD} \ | 71 | ADMIN_PASSWORD=${ADMIN_PASSWORD} \ |
| 70 | SERVICE_PASSWORD=${SERVICE_PASSWORD} \ | 72 | SERVICE_PASSWORD=${SERVICE_PASSWORD} \ |
| 71 | SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME} \ | 73 | SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME} \ |
| 72 | bash /etc/keystone/identity.sh | 74 | bash /etc/keystone/identity.sh |
| 75 | |||
| 76 | # end python-keystone postinst | ||
| 73 | } | 77 | } |
| 74 | 78 | ||
| 75 | PACKAGES += " ${SRCNAME}" | 79 | PACKAGES += " ${SRCNAME}" |
