summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-07-04 18:25:27 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:57 -0400
commit8841738416c86e4db14aeb9adcfabb98125016a3 (patch)
tree245512ba204015755d1c2e1d419b3b2b22d41b70 /meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb
parent8be1d5385f2f4eb85ffc46db73f964428563af8e (diff)
downloadmeta-cloud-services-8841738416c86e4db14aeb9adcfabb98125016a3.tar.gz
nova, glance, keystone, quantum: Make sure postgres is running
To initialize the databases the openstack components require that the postgresql server is running. Because there is no guarantee to the order in which postinstalls are run, the postinstalls first check to see if postgresql is running, and start it if it's not. Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb b/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb
index 56eaaf0..dfbe0dc 100644
--- a/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb
+++ b/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb
@@ -57,7 +57,16 @@ pkg_postinst_${SRCNAME} () {
57 exit 1 57 exit 1
58 fi 58 fi
59 59
60 # This is to make sure postgres is configured and running
61 if ! pidof postmaster > /dev/null; then
62 sudo -u postgres initdb -D /etc/postgresql/
63 /etc/init.d/postgresql start
64 sleep 0.2
65 sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'"
66 fi
67
60 sudo -u postgres createdb quantum 68 sudo -u postgres createdb quantum
69
61} 70}
62 71
63PACKAGES += " \ 72PACKAGES += " \