From: Gurucharan Shetty Date: Thu, 20 Feb 2014 22:58:36 +0000 (-0800) Subject: ovs-vswitchd: Don't register for SIGHUP. X-Git-Tag: sliver-openvswitch-2.1.90-1~1^2~3 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=0b114fa05db7166c49eea70ca4a3a41dd75b1f53 ovs-vswitchd: Don't register for SIGHUP. We are registering an interest in SIGHUP to reopen log files. But there is an 'ovs-appctl vlog/reopen' command that does the same and is used in the logrotate config for the distributions. So remove the redundant functionality. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/NEWS b/NEWS index b7f70e8e0..f0d5a1062 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ Post-v2.1.0 - New "check-ryu" Makefile target for running Ryu tests for OpenFlow controllers against Open vSwitch. See INSTALL for details. - Added IPFIX support for SCTP flows and templates for ICMPv4/v6 flows. + - Upon the receipt of a SIGHUP signal, ovs-vswitchd no longer reopens its + log file (it will terminate instead). Please use 'ovs-appctl vlog/reopen' + instead. v2.1.0 - xx xxx xxxx diff --git a/vswitchd/ovs-vswitchd.8.in b/vswitchd/ovs-vswitchd.8.in index d2544f7f1..e9dc48397 100644 --- a/vswitchd/ovs-vswitchd.8.in +++ b/vswitchd/ovs-vswitchd.8.in @@ -30,9 +30,6 @@ switching across each bridge described in its configuration files. As the database changes, \fBovs\-vswitchd\fR automatically updates its configuration to match. .PP -Upon receipt of a SIGHUP signal, \fBovs\-vswitchd\fR reopens its log -file, if one was specified on the command line. -.PP \fBovs\-vswitchd\fR switches may be configured with any of the following features: . diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index b6a66215a..da18a0a39 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -37,7 +37,6 @@ #include "openflow/openflow.h" #include "ovsdb-idl.h" #include "poll-loop.h" -#include "signals.h" #include "simap.h" #include "stream-ssl.h" #include "stream.h" @@ -65,7 +64,6 @@ main(int argc, char *argv[]) { char *unixctl_path = NULL; struct unixctl_server *unixctl; - struct signal *sighup; char *remote; bool exiting; int retval; @@ -75,7 +73,6 @@ main(int argc, char *argv[]) service_start(&argc, &argv); remote = parse_options(argc, argv, &unixctl_path); signal(SIGPIPE, SIG_IGN); - sighup = signal_register(SIGHUP); ovsrec_init(); daemonize_start(); @@ -101,9 +98,6 @@ main(int argc, char *argv[]) exiting = false; while (!exiting) { - if (signal_poll(sighup)) { - vlog_reopen_log_file(); - } memory_run(); if (memory_should_report()) { struct simap usage; @@ -117,7 +111,6 @@ main(int argc, char *argv[]) unixctl_server_run(unixctl); netdev_run(); - signal_wait(sighup); memory_wait(); bridge_wait(); unixctl_server_wait(unixctl);