Browse code

Use --log-config with keystone.

Keystone does not support a log_config config file option. It
only respects the command line argument.

Fixes bug 910436.

Change-Id: I276ad5da239d5d9b6a1dcdd1013972c7948c511b

James E. Blair authored on 2012/01/01 04:14:56
Showing 1 changed files
... ...
@@ -1162,11 +1162,9 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
1162 1162
     if [ "$SYSLOG" != "False" ]; then
1163 1163
         sed -i -e '/^handlers=devel$/s/=devel/=production/' \
1164 1164
             $KEYSTONE_DIR/etc/logging.cnf
1165
-        sed -i -e "
1166
-            /^log_file/s/log_file/\#log_file/; \
1167
-            /^log_config/d;/^\[DEFAULT\]/a\
1168
-            log_config=$KEYSTONE_DIR/etc/logging.cnf" \
1165
+        sed -i -e "/^log_file/s/log_file/\#log_file/" \
1169 1166
             $KEYSTONE_DIR/etc/keystone.conf
1167
+        KEYSTONE_LOG_CONFIG="--log-config $KEYSTONE_DIR/etc/logging.cnf"
1170 1168
     fi
1171 1169
 fi
1172 1170
 
... ...
@@ -1219,7 +1217,7 @@ fi
1219 1219
 
1220 1220
 # launch the keystone and wait for it to answer before continuing
1221 1221
 if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
1222
-    screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone --config-file $KEYSTONE_CONF -d"
1222
+    screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG -d"
1223 1223
     echo "Waiting for keystone to start..."
1224 1224
     if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget -q -O- http://127.0.0.1:5000; do sleep 1; done"; then
1225 1225
       echo "keystone did not start"