summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2017-11-15 12:59:53 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-11-15 15:53:38 -0500
commit3051160f23fe8e06e545859538c86ef3a3c39d7a (patch)
tree97f922e30173df31dda04f10cca3beea27652eb8 /meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
parent3d512115129e2cea97067d23cb72fea62b70dd39 (diff)
downloadmeta-cloud-services-3051160f23fe8e06e545859538c86ef3a3c39d7a.tar.gz
python-*: fixup postinst scripts
Checking for "$D" and doing an "exit 1" now results in errors such as: [log_check] warning: %post(keystone-cronjobs-...) scriptlet failed, exit status 2 during image creation. Instead of escaping the script for "level-1" (image creation postinst) we wrap the "level-2" (first boot) postinst in an if statement. This also ensure the scriptlet in indentity.bbclass is less prone to behaving differently based on the postinsts defined in the classes which inherit 'identity'. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> 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.bb24
1 files changed, 11 insertions, 13 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
index 5645626..4b01022 100644
--- a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
@@ -108,20 +108,18 @@ do_install_append() {
108} 108}
109 109
110pkg_postinst_${SRCNAME}-setup () { 110pkg_postinst_${SRCNAME}-setup () {
111 if [ "x$D" != "x" ]; then 111 if [ -z "$D" ]; then
112 exit 1 112 # This is to make sure postgres is configured and running
113 if ! pidof postmaster > /dev/null; then
114 /etc/init.d/postgresql-init
115 /etc/init.d/postgresql start
116 sleep 2
117 fi
118
119 mkdir /var/log/ceilometer
120 sudo -u postgres createdb ceilometer
121 ceilometer-dbsync
113 fi 122 fi
114
115 # This is to make sure postgres is configured and running
116 if ! pidof postmaster > /dev/null; then
117 /etc/init.d/postgresql-init
118 /etc/init.d/postgresql start
119 sleep 2
120 fi
121
122 mkdir /var/log/ceilometer
123 sudo -u postgres createdb ceilometer
124 ceilometer-dbsync
125} 123}
126 124
127inherit setuptools identity hosts update-rc.d default_configs monitor 125inherit setuptools identity hosts update-rc.d default_configs monitor