summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-heat_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-heat_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-heat_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-heat_git.bb10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-heat_git.bb b/meta-openstack/recipes-devtools/python/python-heat_git.bb
index c560a8b..abe3517 100644
--- a/meta-openstack/recipes-devtools/python/python-heat_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-heat_git.bb
@@ -61,7 +61,7 @@ do_install_append() {
61 fi 61 fi
62} 62}
63 63
64pkg_postinst_${SRCNAME}-engine () { 64pkg_postinst_${SRCNAME}-setup () {
65 if [ "x$D" != "x" ]; then 65 if [ "x$D" != "x" ]; then
66 exit 1 66 exit 1
67 fi 67 fi
@@ -70,7 +70,7 @@ pkg_postinst_${SRCNAME}-engine () {
70 if ! pidof postmaster > /dev/null; then 70 if ! pidof postmaster > /dev/null; then
71 /etc/init.d/postgresql-init 71 /etc/init.d/postgresql-init
72 /etc/init.d/postgresql start 72 /etc/init.d/postgresql start
73 sleep 5 73 sleep 2
74 fi 74 fi
75 75
76 mkdir /var/log/heat 76 mkdir /var/log/heat
@@ -81,6 +81,9 @@ pkg_postinst_${SRCNAME}-engine () {
81inherit setuptools identity hosts update-rc.d 81inherit setuptools identity hosts update-rc.d
82 82
83PACKAGES += "${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" 83PACKAGES += "${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine"
84PACKAGES += "${SRCNAME}-setup"
85
86ALLOW_EMPTY_${SRCNAME}-setup = "1"
84 87
85FILES_${PN} = "${libdir}/*" 88FILES_${PN} = "${libdir}/*"
86 89
@@ -98,7 +101,6 @@ FILES_${SRCNAME}-engine = "${bindir}/heat-engine \
98 ${bindir}/* \ 101 ${bindir}/* \
99 ${sysconfdir}/init.d/heat-engine \ 102 ${sysconfdir}/init.d/heat-engine \
100" 103"
101
102RDEPENDS_${PN} += " \ 104RDEPENDS_${PN} += " \
103 python-heatclient \ 105 python-heatclient \
104 python-sqlalchemy \ 106 python-sqlalchemy \
@@ -144,7 +146,7 @@ RDEPENDS_${PN} += " \
144 python-pytz \ 146 python-pytz \
145 " 147 "
146 148
147RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt" 149RDEPENDS_${SRCNAME}-engine = "${PN} ${SRCNAME}-setup ${SRCNAME}-common postgresql postgresql-client python-psycopg2 tgt"
148RDEPENDS_${SRCNAME}-api = "${SRCNAME}-engine" 150RDEPENDS_${SRCNAME}-api = "${SRCNAME}-engine"
149RDEPENDS_${SRCNAME}-api-cfn = "${SRCNAME}-engine" 151RDEPENDS_${SRCNAME}-api-cfn = "${SRCNAME}-engine"
150 152