[ovs-dev] [PATCH 1/3] utilities/ovs-ctl.in: Allow non-monitoring daemons

Aaron Conole aconole at redhat.com
Wed Jul 20 21:21:18 UTC 2016


This commit allows the ovs-ctl command to spawn daemons without the
internal process monitor.  This is useful when integrating with,
ex. systemd, which provides its own monitoring facilities.

Signed-off-by: Aaron Conole <aconole at redhat.com>
Acked-by: Ben Pfaff <blp at ovn.org>
Acked-by: Flavio Leitner <fbl at redhat.com>
---
 utilities/ovs-ctl.8  | 5 +++++
 utilities/ovs-ctl.in | 1 +
 utilities/ovs-lib.in | 3 ++-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/utilities/ovs-ctl.8 b/utilities/ovs-ctl.8
index 662b83e..6b8fba7 100644
--- a/utilities/ovs-ctl.8
+++ b/utilities/ovs-ctl.8
@@ -162,6 +162,11 @@ after reboot, but other ports need to be persisted in the database.
 .PP
 The following options are less important:
 .
+.IP "\fB\-\-no\-monitor\fR"
+By default \fBovs\-ctl\fR passes \fB\-\-monitor\fR to \fBovs\-vswitchd\fR and
+\fBovsdb\-server\fR, requesting that it spawn a process monitor which will
+restart the daemon if it crashes.  This option suppresses that behavior.
+.
 .IP "\fB\-\-daemon-cwd=\fIdirectory\fR"
 Specifies the current working directory that the OVS daemons should
 run from.  The default is \fB/\fR (the root directory) if this option
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 8ec825b..d92cf3c 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -499,6 +499,7 @@ set_defaults () {
     FORCE_COREFILES=yes
     MLOCKALL=yes
     SELF_CONFINEMENT=yes
+    MONITOR=yes
     OVSDB_SERVER=yes
     OVS_VSWITCHD=yes
     OVSDB_SERVER_PRIORITY=-10
diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
index 773efb3..5f23269 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
@@ -151,7 +151,8 @@ start_daemon () {
     # pidfile and monitoring
     test -d "$rundir" || install -d -m 755 -o root -g root "$rundir"
     set "$@" --pidfile="$rundir/$daemon.pid"
-    set "$@" --detach --monitor
+    set "$@" --detach
+    test X"$MONITOR" = "Xno" || set "$@" --monitor
 
     # wrapper
     case $wrapper in
-- 
2.5.5




More information about the dev mailing list