]> git.puffer.fish Git - mirror/frr.git/commitdiff
doc: update watchfrr manpage
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 2 Aug 2017 07:10:47 +0000 (09:10 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 2 Aug 2017 21:36:42 +0000 (23:36 +0200)
Remove -R, -a, -A, -e and -z options.  Also remove blocker in the code
that refuses to start if --dry is given together with -k / -s / -r.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
doc/watchfrr.8.in
watchfrr/watchfrr.c

index 82098e1b0d6419f9f480948b51704f07b5b520c7..033f1efb0f85a56d46851eb0ebcf5d34ec37f7ea 100644 (file)
@@ -20,59 +20,6 @@ daemon's VTY UNIX stream socket, and send echo commands to ensure the
 daemon responds. When the daemon crashes, EOF is received from the socket,
 so that watchfrr can react immediately.
 .PP
-This program can run in one of the following 5 modes:
-.TP
-.B Mode 0: monitor
-In this mode, the program serves as a monitor and reports status changes.
-.IP
-Example usage: watchfrr \-d zebra ospfd bgpd
-.TP
-.B Mode 1: global restart
-In this mode, whenever a daemon hangs or crashes, the given command is used
-to restart all watched daemons.
-.IP
-Example usage: watchfrr \-dz \e
-.br
--R '/sbin/service zebra restart; /sbin/service ospfd restart' \e
-.br
-zebra ospfd
-.TP
-.B Mode 2: individual daemon restart
-In this mode, whenever a single daemon hangs or crashes, the given command
-is used to restart this daemon only.
-.IP
-Example usage: watchfrr \-dz \-r '/sbin/service %s restart' \e
-.br
-zebra ospfd bgpd
-.TP
-.B Mode 3: phased zebra restart
-In this mode, whenever a single daemon hangs or crashes, the given command
-is used to restart this daemon only. The only exception is the zebra
-daemon; in this case, the following steps are taken: (1) all other daemons
-are stopped, (2) zebra is restarted, and (3) other daemons are started
-again.
-.IP
-Example usage: watchfrr \-adz \-r '/sbin/service %s restart' \e
-.br
-\-s '/sbin/service %s start' \e
-.br
-\-k '/sbin/service %s stop' zebra ospfd bgpd
-.TP
-.B Mode 4: phased global restart for any failure
-In this mode, whenever a single daemon hangs or crashes, the following
-steps are taken: (1) all other daemons are stopped, (2) zebra is restarted,
-and (3) other daemons are started again.
-.IP
-Example usage: watchfrr \-Adz \-r '/sbin/service %s restart' \e
-.br
-\-s '/sbin/service %s start' \e
-.br
-\-k '/sbin/service %s stop' zebra ospfd bgpd
-.PP
-Important: It is believed that mode 2 (individual daemon restart) is not
-safe, and mode 3 (phased zebra restart) may not be safe with certain
-routing daemons.
-.PP
 In order to avoid restarting the daemons in quick succession, you can
 supply the
 .B \-m
@@ -87,6 +34,36 @@ the restart delay is set to the value of
 otherwise the interval is doubled (but capped at the value of
 .BR \-M ).
 .SH OPTIONS
+The following 3 options specify scripts that
+.B watchfrr
+uses to perform start/stop/restart actions.  These options are mandatory
+unless the
+.B --dry
+option is used:
+.TP
+.BI \-s " command" "\fR, \fB\-\-start\-command " command
+Supply a Bourne shell
+.I command
+to start a single daemon. The command string should contain the '%s'
+placeholder to be substituted with the daemon name.
+.TP
+.BI \-k " command" "\fR, \fB\-\-kill\-command " command
+Supply a Bourne shell
+.I command
+to stop a single daemon. The command string should contain the '%s'
+placeholder to be substituted with the daemon name.
+.TP
+.BI \-r " command" "\fR, \fB\-\-restart " command
+Supply a Bourne shell
+.I command
+to restart a single daemon. The command string should contain the '%s'
+placeholder to be substituted with the daemon name.
+.PP
+Other options:
+.TP
+.BI \-\-dry
+Run watchfrr in "dry-run" mode, only monitoring the specified daemons but not
+performing any start/stop/restart actions.
 .TP
 .BR \-d ", " \-\-daemon
 Run in daemon mode. When supplied, error messages are sent to Syslog
@@ -97,10 +74,6 @@ Set the VTY socket
 .I directory
 (the default value is "/var/run/frr").
 .TP
-.BR \-e ", " \-\-no\-echo
-Do not ping the daemons to test whether they respond. This option is
-necessary if one or more daemons do not support the echo command.
-.TP
 .BI \-l " level" "\fR, \fB\-\-loglevel " level
 Set the logging
 .I level
@@ -131,68 +104,6 @@ Set the restart (kill) timeout in seconds (the default value is "20"). If
 any background jobs are still running after this period has elapsed, they
 will be killed.
 .TP
-.BI \-r " command" "\fR, \fB\-\-restart " command
-Supply a Bourne shell
-.I command
-to restart a single daemon. The command string should contain the '%s'
-placeholder to be substituted with the daemon name.
-.IP
-Note that
-.B \-r
-and
-.B \-R
-options are not compatible.
-.TP
-.BI \-s " command" "\fR, \fB\-\-start\-command " command
-Supply a Bourne shell
-.I command
-to start a single daemon. The command string should contain the '%s'
-placeholder to be substituted with the daemon name.
-.TP
-.BI \-k " command" "\fR, \fB\-\-kill\-command " command
-Supply a Bourne shell
-.I command
-to stop a single daemon. The command string should contain the '%s'
-placeholder to be substituted with the daemon name.
-.TP
-.BR \-R ", " \-\-restart\-all
-When one or more daemons are shut down, try to restart them using the
-Bourne shell command supplied on the command line.
-.IP
-Note that
-.B \-r
-and
-.B \-R
-options are not compatible.
-.TP
-.BR \-z ", " \-\-unresponsive\-restart
-When a daemon is in an unresponsive state, treat it as being shut down for
-the restart purposes.
-.TP
-.BR \-a ", " \-\-all\-restart
-When zebra hangs or crashes, restart all daemons taking the following
-steps: (1) stop all other daemons, (2) restart zebra, and (3) start other
-daemons again.
-.IP
-Note that this option also requires
-.BR \-r ,
-.BR \-s ,
-and
-.B \-k
-options to be specified.
-.TP
-.BR \-A ", " \-\-always\-all\-restart
-When any daemon (i.e., not just zebra) hangs or crashes, restart all
-daemons taking the following steps: (1) stop all other daemons, (2) restart
-zebra, and (3) start other daemons again.
-.IP
-Note that this option also requires
-.BR \-r ,
-.BR \-s ,
-and
-.B \-k
-options to be specified.
-.TP
 .BI \-p " filename" "\fR, \fB\-\-pid\-file " filename
 Set the process identifier
 .I filename
@@ -204,9 +115,8 @@ When the supplied
 is found in any of the command line option arguments (i.e.,
 .BR \-r ,
 .BR \-s ,
-.BR \-k ,
 or
-.BR \-R ),
+.BR \-k ),
 replace it with a space.
 .IP
 This is an ugly hack to circumvent problems with passing the command line
index be36b2a5db715550fc6389583d4056231f8a20ed..6926154552e5380999fc581c4574099ec350d8b9 100644 (file)
@@ -1107,9 +1107,8 @@ int main(int argc, char **argv)
 
        if (watch_only
            && (gs.start_command || gs.stop_command || gs.restart_command)) {
-               fputs("Options -r/-s/-k make no sense combined with -D.\n",
+               fputs("Options -r/-s/-k are not used when --dry is active.\n",
                      stderr);
-               frr_help_exit(1);
        }
        if (!watch_only
            && (!gs.restart_command || !gs.start_command || !gs.stop_command)) {