xenserver: Set default file log level and fix brcompatd file
authorJustin Pettit <jpettit@nicira.com>
Fri, 11 Sep 2009 17:52:40 +0000 (10:52 -0700)
committerJustin Pettit <jpettit@nicira.com>
Fri, 11 Sep 2009 17:54:39 +0000 (10:54 -0700)
Set the default log level for file logging to INFO for ovs-vswitchd and
ovs-brcompatd.  This is done so that coverage messages are kept in the
log file, since we no longer log them through syslog due its synchronous
writing on Xen hosts.  The issue is described in detail in commit 6bc995e.

Fix test for whether file logging should be enabled for ovs-brcompatd.

Reported by Ian Campbell.

xenserver/etc_init.d_vswitch

index 6ca0a1de0d970fae1e3d3a1a68055d23e24fe2b1..740f35c6b4c5b4a20049e3ea339be8fed528f5d6 100755 (executable)
@@ -35,7 +35,7 @@ VSWITCHD_PIDFILE="${VSWITCHD_PIDFILE:-/var/run/ovs-vswitchd.pid}"
 VSWITCHD_RUN_DIR="${VSWITCHD_RUN_DIR:-/var/xen/vswitch}"
 VSWITCHD_PRIORITY="${VSWITCHD_PRIORITY:--10}"
 VSWITCHD_LOGFILE="${VSWITCHD_LOGFILE:-/var/log/ovs-vswitchd.log}"
-VSWITCHD_FILE_LOGLEVEL="${VSWITCHD_FILE_LOGLEVEL:-}"
+VSWITCHD_FILE_LOGLEVEL="${VSWITCHD_FILE_LOGLEVEL:-INFO}"
 VSWITCHD_SYSLOG_LOGLEVEL="${VSWITCHD_SYSLOG_LOGLEVEL:-ERR}"
 VSWITCHD_MEMLEAK_LOGFILE="${VSWITCHD_MEMLEAK_LOGFILE:-}"
 VSWITCHD_STRACE_LOG="${VSWITCHD_STRACE_LOG:-}"
@@ -48,7 +48,7 @@ BRCOMPATD_PIDFILE="${BRCOMPATD_PIDFILE:-/var/run/ovs-brcompatd.pid}"
 BRCOMPATD_RUN_DIR="${BRCOMPATD_RUN_DIR:-/var/xen/vswitch}"
 BRCOMPATD_PRIORITY="${BRCOMPATD_PRIORITY:--10}"
 BRCOMPATD_LOGFILE="${BRCOMPATD_LOGFILE:-/var/log/ovs-brcompatd.log}"
-BRCOMPATD_FILE_LOGLEVEL="${BRCOMPATD_FILE_LOGLEVEL:-}"
+BRCOMPATD_FILE_LOGLEVEL="${BRCOMPATD_FILE_LOGLEVEL:-INFO}"
 BRCOMPATD_SYSLOG_LOGLEVEL="${BRCOMPATD_SYSLOG_LOGLEVEL:-ERR}"
 BRCOMPATD_MEMLEAK_LOGFILE="${BRCOMPATD_MEMLEAK_LOGFILE:-}"
 BRCOMPATD_STRACE_LOG="${BRCOMPATD_STRACE_LOG:-}"
@@ -169,7 +169,7 @@ function start_brcompatd {
         mkdir -p "$BRCOMPATD_RUN_DIR"
     fi
     cd "$BRCOMPATD_RUN_DIR"
-    if [ -n "$BRCOMPATD_FILE_LOGLEVEL" ]; then
+    if [ -n "$BRCOMPATD_FILE_LOGLEVEL" ]; then
         logfile_level_opt="-vANY:FILE:${BRCOMPATD_FILE_LOGLEVEL}"
         logfile_file_opt="--log-file=$BRCOMPATD_LOGFILE"
     fi