[ovs-dev] [PATCH 4/4] xenserver: Have ovs-brcompatd's log file rotated
Justin Pettit
jpettit at nicira.com
Fri Sep 11 16:34:50 UTC 2009
Suggested by Ian Campbell.
---
xenserver/etc_init.d_vswitch | 9 +++++++++
xenserver/etc_logrotate.d_vswitch | 6 +++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/xenserver/etc_init.d_vswitch b/xenserver/etc_init.d_vswitch
index 175ff54..2810752 100755
--- a/xenserver/etc_init.d_vswitch
+++ b/xenserver/etc_init.d_vswitch
@@ -115,6 +115,14 @@ function reload_vswitchd {
fi
}
+function reload_brcompatd {
+ if [ -f "$BRCOMPATD_PIDFILE" ]; then
+ "$appctl" \
+ --target=ovs-brcompatd.$(cat "$BRCOMPATD_PIDFILE").ctl \
+ --execute=brcompatd/reload
+ fi
+}
+
function start_vswitchd {
local syslog_opt="-vANY:SYSLOG:${VSWITCHD_SYSLOG_LOGLEVEL}"
local logfile_file_opt=""
@@ -292,6 +300,7 @@ case "$1" in
;;
reload)
reload_vswitchd
+ reload_brcompatd
;;
strace-vswitchd)
shift
diff --git a/xenserver/etc_logrotate.d_vswitch b/xenserver/etc_logrotate.d_vswitch
index dae235b..6366c67 100644
--- a/xenserver/etc_logrotate.d_vswitch
+++ b/xenserver/etc_logrotate.d_vswitch
@@ -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
}
--
1.6.4
More information about the dev
mailing list