summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-cinder_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-cinder_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-cinder_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb48
1 files changed, 23 insertions, 25 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
index e70a3aa..9f70beb 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
@@ -124,31 +124,29 @@ do_install_append() {
124} 124}
125 125
126pkg_postinst_${SRCNAME}-setup () { 126pkg_postinst_${SRCNAME}-setup () {
127 if [ "x$D" != "x" ]; then 127 if [ -z "$D" ]; then
128 exit 1 128 # This is to make sure postgres is configured and running
129 fi 129 if ! pidof postmaster > /dev/null; then
130 130 /etc/init.d/postgresql-init
131 # This is to make sure postgres is configured and running 131 /etc/init.d/postgresql start
132 if ! pidof postmaster > /dev/null; then 132 fi
133 /etc/init.d/postgresql-init 133
134 /etc/init.d/postgresql start 134 if [ ! -d /var/log/cinder ]; then
135 fi 135 mkdir /var/log/cinder
136 136 fi
137 if [ ! -d /var/log/cinder ]; then 137
138 mkdir /var/log/cinder 138 sudo -u postgres createdb cinder
139 fi 139 cinder-manage db sync
140 140
141 sudo -u postgres createdb cinder 141 # Create Cinder nfs_share config file with default nfs server
142 cinder-manage db sync 142 if [ ! -f /etc/cinder/nfs_shares ]; then
143 143 /bin/bash /etc/cinder/drivers/nfs_setup.sh
144 # Create Cinder nfs_share config file with default nfs server 144 fi
145 if [ ! -f /etc/cinder/nfs_shares ]; then 145
146 /bin/bash /etc/cinder/drivers/nfs_setup.sh 146 # Create Cinder glusterfs_share config file with default glusterfs server
147 fi 147 if [ ! -f /etc/cinder/glusterfs_shares ] && [ -f /usr/sbin/glusterfsd ]; then
148 148 /bin/bash /etc/cinder/drivers/glusterfs_setup.sh
149 # Create Cinder glusterfs_share config file with default glusterfs server 149 fi
150 if [ ! -f /etc/cinder/glusterfs_shares ] && [ -f /usr/sbin/glusterfsd ]; then
151 /bin/bash /etc/cinder/drivers/glusterfs_setup.sh
152 fi 150 fi
153} 151}
154 152