[ovs-dev] [PATCH 1/3] utilities/ovs-ctl.in: Allow non-monitoring daemons
Aaron Conole
aconole at redhat.com
Mon Jul 25 14:12:31 UTC 2016
Flaviof <flavio at flaviof.com> writes:
> On Wed, Jul 20, 2016 at 4:21 PM, Aaron Conole <aconole at redhat.com> wrote:
>
> 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
>
> There is no need for quotes around Xno.
> To be consistent with the other test lines in this file, consider doing that.
Sure thing! Thank so much for the review, Flavio!
> Otherwise...
>
> Acked-by: Flavio Fernandes <flavio at flaviof.com>
>
>
>
> # wrapper
> case $wrapper in
> --
> 2.5.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list