xenserver: Have ovs-brcompatd's log file rotated
authorJustin Pettit <jpettit@nicira.com>
Fri, 11 Sep 2009 15:15:49 +0000 (08:15 -0700)
committerJustin Pettit <jpettit@nicira.com>
Sat, 12 Sep 2009 01:09:19 +0000 (18:09 -0700)
Suggested by Ian Campbell.

xenserver/etc_init.d_vswitch
xenserver/etc_logrotate.d_vswitch

index 740f35c6b4c5b4a20049e3ea339be8fed528f5d6..c5659e0d04fdf8e9c6964ea40ddb0146bd321c26 100755 (executable)
@@ -115,6 +115,13 @@ function reload_vswitchd {
     fi
 }
 
+function reload_brcompatd {
+    if [ -f "$BRCOMPATD_PIDFILE" ]; then
+        "$appctl" \
+            --target=ovs-brcompatd.$(cat "$BRCOMPATD_PIDFILE").ctl --reopen
+    fi
+}
+
 function start_vswitchd {
     local syslog_opt="-vANY:SYSLOG:${VSWITCHD_SYSLOG_LOGLEVEL}"
     local logfile_file_opt=""
@@ -292,6 +299,7 @@ case "$1" in
         ;;
     reload)
         reload_vswitchd
+        reload_brcompatd
         ;;
     strace-vswitchd)
         shift
index dae235bd570da291b62130cac4aad1012d827227..6366c6758806313bfbd738b956fe68b496be3e47 100644 (file)
@@ -5,10 +5,10 @@
 # notice and this notice are preserved.  This file is offered as-is,
 # without warranty of any kind.
 
-/var/log/ovs-vswitchd.log {
+/var/log/ovs-vswitchd.log /var/log/ovs-brcompatd.log {
        sharedscripts
        postrotate
-        # Send sighup to vswitch which will cause it to reopen its log files.
-        /sbin/service vswitch reload
+       # Tell ovs-vswitchd and ovs-brcompatd to reopen their log files
+       /sbin/service vswitch reload
        endscript
 }