Browse code

Ensure that keystone uses global debug setting

When setting ENABLE_DEBUG_LOG_LEVEL the keystone screen would ignore
this setting and always use the debug mode.

Change-Id: I934443c2976e936198fc93da4cca717e6cb84e6f

Gary Kotton authored on 2014/09/22 16:55:02
Showing 1 changed files
... ...
@@ -283,7 +283,7 @@ function configure_keystone {
283 283
     fi
284 284
 
285 285
     if [ "$KEYSTONE_USE_MOD_WSGI" == "True" ]; then
286
-        iniset $KEYSTONE_CONF DEFAULT debug "True"
286
+        iniset $KEYSTONE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
287 287
         # Eliminate the %(asctime)s.%(msecs)03d from the log format strings
288 288
         iniset $KEYSTONE_CONF DEFAULT logging_context_format_string "%(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s"
289 289
         iniset $KEYSTONE_CONF DEFAULT logging_default_format_string "%(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s"
... ...
@@ -476,8 +476,12 @@ function start_keystone {
476 476
         tail_log key /var/log/$APACHE_NAME/keystone.log
477 477
         tail_log key-access /var/log/$APACHE_NAME/keystone_access.log
478 478
     else
479
+        local EXTRA_PARAMS=""
480
+        if [ "$ENABLE_DEBUG_LOG_LEVEL" == "True" ]; then
481
+            EXTRA_PARAMS="--debug"
482
+        fi
479 483
         # Start Keystone in a screen window
480
-        run_process key "$KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF --debug"
484
+        run_process key "$KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF $EXTRA_PARAMS"
481 485
     fi
482 486
 
483 487
     echo "Waiting for keystone to start..."