]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
* Sets heat/configure_db to false by default.
authorThomas Goirand <thomas@goirand.fr>
Thu, 8 Jan 2015 16:32:40 +0000 (17:32 +0100)
committerThomas Goirand <thomas@goirand.fr>
Thu, 8 Jan 2015 16:32:57 +0000 (17:32 +0100)
  * Only calls pkgos_dbc_postinst and su heat -c "heat-manage db_sync" if
    heat/configure_db is set to true
(cherry picked from commit 8b3aa4cb3a805ad28e5dd501fd4488eec095ce50)

Rewritten-From: 3770643c101eabe2c1863e805803361ec8d87d87

trusty/debian/heat-common.postinst.in
trusty/debian/heat-common.templates

index da8bd7652392955fef3697eb95c93afd64c6ffc3..9149001835db6a742a444c5eef94bf46f0e58394 100644 (file)
@@ -19,15 +19,22 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
        chown heat:heat /var/lib/heat /etc/heat
         pkgos_write_new_conf heat heat.conf
 
-       pkgos_dbc_postinst ${CONF} database connection heat $@
+       db_get glance/configure_db
+       if [ "$RET" = "true" ] ; then
+               pkgos_dbc_postinst ${CONF} database connection heat $@
+       fi
        pkgos_rabbit_write_conf ${CONF} DEFAULT heat
         pkgos_write_admin_creds ${CONF} keystone_authtoken heat
        pkgos_register_endpoint_postinst heat heat orchestration "Heat Orchestration API" 8004 /v1/'%(tenant_id)s'
        # This is the equivalent of db-sync:
-       su heat -c "heat-manage db_sync"
+       db_get glance/configure_db
+       if [ "$RET" = "true" ] ; then
+               su heat -c "heat-manage db_sync"
+       fi
 
         chown -R heat:adm /var/log/heat
         chmod 0750 /var/log/heat
+       db_stop
 fi
 
 #DEBHELPER#
index 281d6e4e4d1125f5f48f750d05cbc2245f4fcec3..d274487077cea0079d0219a31b98013a8f573f8b 100644 (file)
@@ -80,7 +80,7 @@ _Description: Name of the region to register:
 
 Template: heat/configure_db
 Type: boolean
-Default: true
+Default: false
 _Description: Set up a database for heat-common?
  No database has been set up for heat-common to use. Before
  continuing, you should make sure you have the following information: