Message ID | 1467408383-5703-2-git-send-email-aconole@redhat.com |
---|---|
State | RFC |
Headers | show |
On Fri, Jul 01, 2016 at 05:26:21PM -0400, Aaron Conole 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@redhat.com> Would you mind using just "--no-monitor" for the option name? It seems more consistent with --monitor, to me. Acked-by: Ben Pfaff <blp@ovn.org>
On Fri, Jul 01, 2016 at 09:32:24PM -0700, Ben Pfaff wrote: > On Fri, Jul 01, 2016 at 05:26:21PM -0400, Aaron Conole 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@redhat.com> > > Would you mind using just "--no-monitor" for the option name? It seems > more consistent with --monitor, to me. To me as well. fbl
Ben Pfaff <blp@ovn.org> writes: > On Fri, Jul 01, 2016 at 05:26:21PM -0400, Aaron Conole 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@redhat.com> > > Would you mind using just "--no-monitor" for the option name? It seems > more consistent with --monitor, to me. > > Acked-by: Ben Pfaff <blp@ovn.org> Can do. Thanks so much for the review and the tag, Ben!
Flavio Leitner <fbl@sysclose.org> writes: > On Fri, Jul 01, 2016 at 09:32:24PM -0700, Ben Pfaff wrote: >> On Fri, Jul 01, 2016 at 05:26:21PM -0400, Aaron Conole 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@redhat.com> >> >> Would you mind using just "--no-monitor" for the option name? It seems >> more consistent with --monitor, to me. > > To me as well. > fbl +1
diff --git a/utilities/ovs-ctl.8 b/utilities/ovs-ctl.8 index 662b83e..dc867aa 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\-monitoring\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 b2a97fc..9e3435a 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 + MONITORING=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..dbb8f98 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"$MONITORING" = "Xno" || set "$@" --monitor # wrapper case $wrapper in
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@redhat.com> --- utilities/ovs-ctl.8 | 5 +++++ utilities/ovs-ctl.in | 1 + utilities/ovs-lib.in | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-)