From 5f0faff4099c6673cc8eb61f64ab906848a2580f Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Tue, 29 Oct 2013 08:26:40 +1100 Subject: [PATCH] Only log to console in heat-db-setup Make sure heat-manage does not use heat.conf logging in the heat-db-setup script as the logging directory might not be setup yet. Change-Id: I16db3fde1c7bfe5f027c77f2a25ffa2104d15491 Closes-bug: #1191925 --- bin/heat-db-setup | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/bin/heat-db-setup b/bin/heat-db-setup index d7a5844125..cb110145bc 100755 --- a/bin/heat-db-setup +++ b/bin/heat-db-setup @@ -249,8 +249,33 @@ if [ "${MYSQL_HEAT_PW}" != "${MYSQL_HEAT_PW_DEFAULT}" ] ; then sed -i -e "s/mysql:\/\/heat:\(.*\)@/mysql:\/\/heat:${MYSQL_HEAT_PW}@/" ${HEAT_CONFIG} fi -heat-manage db_sync +# override the logging config in heat.conf +log_conf=$(mktemp /tmp/heat-logging.XXXXXXXXXX.conf) +cat < $log_conf +[loggers] +keys=root +[handlers] +keys=consoleHandler + +[formatters] +keys=simpleFormatter + +[logger_root] +level=INFO +handlers=consoleHandler + +[handler_consoleHandler] +class=StreamHandler +formatter=simpleFormatter +args=(sys.stdout,) + +[formatter_simpleFormatter] +format=%(name)s - %(levelname)s - %(message)s +EOF + +heat-manage --log-config=$log_conf db_sync +rm $log_conf # Do a final sanity check on the database.