summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-keystone_git.bb
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-11-20 00:38:32 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-11-25 15:25:38 -0500
commitbebcf13e5eca199d98a2c94ef1c20da50cba7f51 (patch)
tree061bbfd39df6c5ec85eeefce05498bed46f55f03 /meta-openstack/recipes-devtools/python/python-keystone_git.bb
parent466bdc6aed5d2ba0253e0e69f3cde88b11097ff8 (diff)
downloadmeta-cloud-services-bebcf13e5eca199d98a2c94ef1c20da50cba7f51.tar.gz
initscripts: split into -setup and init packages
Many OpenStack modules require a first boot action to setup up users, databases, bridges, etc. These same packages install initscripts to start daemons and servers. The 1st boot package post install actions immediately exit to indicate that the action cannot be performed in the cross environment and instead should be done on first boot. The update-rc.d post install actions are intended to be run in the cross environment to symlink scripts into the proper runlevels. The early exit from the db setup routines, means that the rc files are not linked in host cross. If the rootfs doesn't contain update-rc.d, they also will not be set up on first boot. The end result is a system that does not start all of its required services on boot. To fix this, we split out db and other first boot setup tasks into dedicated (but empty) -setup packages. These run on first boot, while update-rc.d is left to create the proper symlinks. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-keystone_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone_git.bb16
1 files changed, 9 insertions, 7 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_git.bb b/meta-openstack/recipes-devtools/python/python-keystone_git.bb
index 882848a..e018d8d 100644
--- a/meta-openstack/recipes-devtools/python/python-keystone_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-keystone_git.bb
@@ -50,7 +50,7 @@ do_install_append() {
50 fi 50 fi
51} 51}
52 52
53pkg_postinst_${SRCNAME} () { 53pkg_postinst_${SRCNAME}-setup () {
54 # python-keystone postinst start 54 # python-keystone postinst start
55 if [ "x$D" != "x" ]; then 55 if [ "x$D" != "x" ]; then
56 exit 1 56 exit 1
@@ -58,9 +58,9 @@ pkg_postinst_${SRCNAME} () {
58 58
59 # This is to make sure postgres is configured and running 59 # This is to make sure postgres is configured and running
60 if ! pidof postmaster > /dev/null; then 60 if ! pidof postmaster > /dev/null; then
61 /etc/init.d/postgresql-init 61 /etc/init.d/postgresql-init
62 /etc/init.d/postgresql start 62 /etc/init.d/postgresql start
63 sleep 5 63 sleep 2
64 fi 64 fi
65 65
66 sudo -u postgres createdb keystone 66 sudo -u postgres createdb keystone
@@ -74,12 +74,14 @@ pkg_postinst_${SRCNAME} () {
74 ADMIN_PASSWORD=${ADMIN_PASSWORD} \ 74 ADMIN_PASSWORD=${ADMIN_PASSWORD} \
75 SERVICE_PASSWORD=${SERVICE_PASSWORD} \ 75 SERVICE_PASSWORD=${SERVICE_PASSWORD} \
76 SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME} \ 76 SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME} \
77 bash /etc/keystone/identity.sh 77 bash /etc/keystone/identity.sh
78 78
79 # end python-keystone postinst 79 # end python-keystone postinst
80} 80}
81 81
82PACKAGES += " ${SRCNAME}" 82PACKAGES += " ${SRCNAME} ${SRCNAME}-setup"
83
84ALLOW_EMPTY_${SRCNAME}-setup = "1"
83 85
84FILES_${PN} = "${libdir}/*" 86FILES_${PN} = "${libdir}/*"
85 87
@@ -107,7 +109,7 @@ RDEPENDS_${PN} += "python-pam \
107 python-dogpile.cache \ 109 python-dogpile.cache \
108 " 110 "
109 111
110RDEPENDS_${SRCNAME} = "${PN} \ 112RDEPENDS_${SRCNAME} = "${PN} ${SRCNAME}-setup \
111 postgresql postgresql-client python-psycopg2" 113 postgresql postgresql-client python-psycopg2"
112 114
113INITSCRIPT_PACKAGES = "${SRCNAME}" 115INITSCRIPT_PACKAGES = "${SRCNAME}"