ovs-vswitchd: Don't register for SIGHUP.
authorGurucharan Shetty <gshetty@nicira.com>
Thu, 20 Feb 2014 22:58:36 +0000 (14:58 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Sat, 22 Feb 2014 00:43:04 +0000 (16:43 -0800)
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 <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
NEWS
vswitchd/ovs-vswitchd.8.in
vswitchd/ovs-vswitchd.c

diff --git a/NEWS b/NEWS
index b7f70e8..f0d5a10 100644 (file)
--- 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
index d2544f7..e9dc483 100644 (file)
@@ -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:
 .
index b6a6621..da18a0a 100644 (file)
@@ -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);