summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-heat/heat.init
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-07-24 13:04:41 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-07-25 15:45:25 -0400
commit3bbd08214617f5a5e7b54253f9f8b786623546c8 (patch)
treed782a074f3a013b302446817ef9d147ddee6bb60 /meta-openstack/recipes-devtools/python/python-heat/heat.init
parentce99c21125614dfa72428a9ef3ed563db8c99c93 (diff)
downloadmeta-cloud-services-3bbd08214617f5a5e7b54253f9f8b786623546c8.tar.gz
openstack initscript: add reset
Some of the openstack data is associated with external resources (ie glance may have external files), we explicitly invoke the delete commands on those in additional to dropping and recreating the databases. Signed-off-by: Amy Fong <amy.fong@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-heat/heat.init')
-rw-r--r--meta-openstack/recipes-devtools/python/python-heat/heat.init24
1 files changed, 23 insertions, 1 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-heat/heat.init b/meta-openstack/recipes-devtools/python/python-heat/heat.init
index 4d8c180..5e0719f 100644
--- a/meta-openstack/recipes-devtools/python/python-heat/heat.init
+++ b/meta-openstack/recipes-devtools/python/python-heat/heat.init
@@ -76,6 +76,25 @@ status()
76 echo "$DESC is not running" 76 echo "$DESC is not running"
77} 77}
78 78
79reset()
80{
81 stop
82
83 # This is to make sure postgres is configured and running
84 if ! pidof postmaster > /dev/null; then
85 /etc/init.d/postgresql-init
86 /etc/init.d/postgresql start
87 sleep 2
88 fi
89
90 [ ! -d /var/log/heat ] && mkdir /var/log/heat
91 sudo -u postgres dropdb heat
92 sudo -u postgres createdb heat
93 heat-manage db_sync
94
95 start
96}
97
79case "$1" in 98case "$1" in
80 start) 99 start)
81 start 100 start
@@ -90,8 +109,11 @@ case "$1" in
90 status) 109 status)
91 status 110 status
92 ;; 111 ;;
112 reset)
113 reset
114 ;;
93 *) 115 *)
94 echo "Usage: $0 {start|stop|force-reload|restart|reload|status}" 116 echo "Usage: $0 {start|stop|force-reload|restart|reload|status|reset}"
95 exit 1 117 exit 1
96 ;; 118 ;;
97esac 119esac