summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-ceilometer_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-ceilometer_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-ceilometer_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer_git.bb12
1 files changed, 7 insertions, 5 deletions
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() {
58 fi 58 fi
59} 59}
60 60
61pkg_postinst_${SRCNAME}-controller () { 61pkg_postinst_${SRCNAME}-setup () {
62 if [ "x$D" != "x" ]; then 62 if [ "x$D" != "x" ]; then
63 exit 1 63 exit 1
64 fi 64 fi
65 65
66 # This is to make sure postgres is configured and running 66 # This is to make sure postgres is configured and running
67 if ! pidof postmaster > /dev/null; then 67 if ! pidof postmaster > /dev/null; then
68 /etc/init.d/postgresql-init 68 /etc/init.d/postgresql-init
69 /etc/init.d/postgresql start 69 /etc/init.d/postgresql start
70 sleep 5 70 sleep 2
71 fi 71 fi
72 72
73 mkdir /var/log/ceilometer 73 mkdir /var/log/ceilometer
@@ -77,7 +77,9 @@ pkg_postinst_${SRCNAME}-controller () {
77 77
78inherit setuptools identity hosts update-rc.d 78inherit setuptools identity hosts update-rc.d
79 79
80PACKAGES += "${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller" 80PACKAGES += "${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-collector ${SRCNAME}-compute ${SRCNAME}-controller"
81
82ALLOW_EMPTY_${SRCNAME}-setup = "1"
81 83
82FILES_${PN} = "${libdir}/*" 84FILES_${PN} = "${libdir}/*"
83 85
@@ -145,7 +147,7 @@ RDEPENDS_${PN} += " \
145 python-pytz \ 147 python-pytz \
146 " 148 "
147 149
148RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt" 150RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-setup ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt"
149RDEPENDS_${SRCNAME}-api = "${SRCNAME}-controller" 151RDEPENDS_${SRCNAME}-api = "${SRCNAME}-controller"
150RDEPENDS_${SRCNAME}-collector = "${SRCNAME}-controller" 152RDEPENDS_${SRCNAME}-collector = "${SRCNAME}-controller"
151RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-ceilometerclient libvirt" 153RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common python-ceilometerclient libvirt"