aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-09-15 21:47:01 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-10-03 01:15:42 -0400
commitdbadb25610122f5848d9588d25d7f5b5d797450a (patch)
tree7126f01ad8d7a6ce2ed3a84c3ef16853aba4ba1e
parent7db05c524eeb3aaae3a34544bfb7076ecb71b88d (diff)
downloadmeta-cloud-services-dbadb25610122f5848d9588d25d7f5b5d797450a.tar.gz
meta-cloud-services-dbadb25610122f5848d9588d25d7f5b5d797450a.tar.bz2
meta-cloud-services-dbadb25610122f5848d9588d25d7f5b5d797450a.zip
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>
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone_2013.1.3.bb12
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() {
}
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}"