From dbadb25610122f5848d9588d25d7f5b5d797450a Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Sun, 15 Sep 2013 21:47:01 -0400 Subject: 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 --- .../recipes-devtools/python/python-keystone_2013.1.3.bb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'meta-openstack/recipes-devtools/python') 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() { } pkg_postinst_${SRCNAME} () { - + # python-keystone postinst start if [ "x$D" != "x" ]; then exit 1 fi @@ -54,8 +54,9 @@ pkg_postinst_${SRCNAME} () { # This is to make sure postgres is configured and running if ! pidof postmaster > /dev/null; then sudo -u postgres initdb -D /etc/postgresql/ + sleep 10 /etc/init.d/postgresql start - sleep 0.2 + sleep 5 sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" fi @@ -63,13 +64,16 @@ pkg_postinst_${SRCNAME} () { keystone-manage db_sync keystone-manage pki_setup - #Create users, services and endpoints + # Create users, services and endpoints /etc/init.d/keystone start - sleep 0.25 + sleep 2 + ADMIN_PASSWORD=${ADMIN_PASSWORD} \ SERVICE_PASSWORD=${SERVICE_PASSWORD} \ SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME} \ bash /etc/keystone/identity.sh + + # end python-keystone postinst } PACKAGES += " ${SRCNAME}" -- cgit v1.2.3-54-g00ecf