From bebcf13e5eca199d98a2c94ef1c20da50cba7f51 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 20 Nov 2013 00:38:32 -0500 Subject: 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 --- .../recipes-devtools/python/python-ceilometer_git.bb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'meta-openstack/recipes-devtools/python/python-ceilometer_git.bb') diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb index fb5526d..5851500 100644 --- a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb +++ b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb @@ -58,16 +58,16 @@ do_install_append() { fi } -pkg_postinst_${SRCNAME}-controller () { +pkg_postinst_${SRCNAME}-setup () { if [ "x$D" != "x" ]; then exit 1 fi - + # This is to make sure postgres is configured and running if ! pidof postmaster > /dev/null; then /etc/init.d/postgresql-init /etc/init.d/postgresql start - sleep 5 + sleep 2 fi mkdir /var/log/ceilometer @@ -77,7 +77,9 @@ pkg_postinst_${SRCNAME}-controller () { inherit setuptools identity hosts update-rc.d -PACKAGES += "${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" +PACKAGES += "${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" + +ALLOW_EMPTY_${SRCNAME}-setup = "1" FILES_${PN} = "${libdir}/*" @@ -145,7 +147,7 @@ RDEPENDS_${PN} += " \ python-pytz \ " -RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt" +RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-setup ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt" RDEPENDS_${SRCNAME}-api = "${SRCNAME}-controller" RDEPENDS_${SRCNAME}-collector = "${SRCNAME}-controller" RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-ceilometerclient libvirt" -- cgit v1.2.3-54-g00ecf