]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Runs db sync as heat user.
authorThomas Goirand <thomas@goirand.fr>
Tue, 19 Mar 2013 05:55:10 +0000 (13:55 +0800)
committerThomas Goirand <thomas@goirand.fr>
Tue, 19 Mar 2013 05:55:10 +0000 (13:55 +0800)
Rewritten-From: d9e0342a7af9c0463301208dfc59ab0a2ce3ac11

xenial/debian/heat-engine.postinst.in

index 141818c2c13e930efdc95cf0af95ba9344fb0085..0b6db676855462f13705a829d9324e545ae9b7d3 100644 (file)
@@ -14,8 +14,9 @@ if [ "$1" = "configure" ] ; then
        pkgos_write_new_conf heat heat-engine.conf
        pkgos_dbc_postinst ${CONF} DEFAULT sql_connection heat $@
 
-       python -m heat.db.sqlalchemy.manage version_control
-       python -m heat.db.sqlalchemy.manage upgrade
+       # This is the equivalent of db-sync:
+       su heat -c "python -m heat.db.sqlalchemy.manage version_control"
+       su heat -c "python -m heat.db.sqlalchemy.manage upgrade"
 fi
 
 #DEBHELPER#