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 <acon...@redhat.com> Reviewed-by: Markos Chandras <mchand...@suse.de> Acked-by: Ben Pfaff <b...@ovn.org> Acked-by: Flavio Fernandes <fla...@flaviof.com> Acked-by: Flavio Leitner <f...@redhat.com> --- v2: * Quotes removed from the test for Xno 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 7fcd734..cbad85a 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@ -167,7 +167,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 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev