Skip to content

Commit

Permalink
watchfrr: Rename watchquagga -> watchfrr
Browse files Browse the repository at this point in the history
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
  • Loading branch information
donaldsharp committed Jan 4, 2017
1 parent 9b532e0 commit 9473e34
Show file tree
Hide file tree
Showing 29 changed files with 160 additions and 160 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

SUBDIRS = lib qpb fpm @ZEBRA@ @LIBRFP@ @RFPTEST@ \
@BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ @LDPD@ \
@ISISD@ @PIMD@ @WATCHQUAGGA@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
@ISISD@ @PIMD@ @WATCHFRR@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
redhat @SOLARIS@ tests tools cumulus

DIST_SUBDIRS = lib qpb fpm zebra bgpd ripd ripngd ospfd ospf6d ldpd \
isisd watchquagga vtysh ospfclient doc m4 pkgsrc redhat tests \
isisd watchfrr vtysh ospfclient doc m4 pkgsrc redhat tests \
solaris pimd @LIBRFP@ @RFPTEST@ tools cumulus

EXTRA_DIST = aclocal.m4 SERVICES REPORTING-BUGS \
Expand Down
22 changes: 11 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ AC_ARG_ENABLE(ospf6d,
AS_HELP_STRING([--disable-ospf6d], [do not build ospf6d]))
AC_ARG_ENABLE(ldpd,
AS_HELP_STRING([--enable-ldpd], [build ldpd]))
AC_ARG_ENABLE(watchquagga,
AS_HELP_STRING([--disable-watchquagga], [do not build watchquagga]))
AC_ARG_ENABLE(watchfrr,
AS_HELP_STRING([--disable-watchfrr], [do not build watchfrr]))
AC_ARG_ENABLE(isisd,
AS_HELP_STRING([--disable-isisd], [do not build isisd]))
AC_ARG_ENABLE(pimd,
Expand Down Expand Up @@ -1170,12 +1170,12 @@ else
fi
AM_CONDITIONAL(LDPD, test "x$LDPD" = "xldpd")

if test "${enable_watchquagga}" = "no";then
WATCHQUAGGA=""
if test "${enable_watchfrr}" = "no";then
WATCHFRR=""
else
WATCHQUAGGA="watchquagga"
WATCHFRR="watchfrr"
fi
AM_CONDITIONAL(WATCHQUAGGA, test "x$WATCHQUAGGA" = "xwatchquagga")
AM_CONDITIONAL(WATCHFRR, test "x$WATCHFRR" = "xwatchfrr")

OSPFCLIENT=""
if test "${enable_ospfapi}" != "no";then
Expand Down Expand Up @@ -1250,7 +1250,7 @@ AC_SUBST(RIPNGD)
AC_SUBST(OSPFD)
AC_SUBST(OSPF6D)
AC_SUBST(LDPD)
AC_SUBST(WATCHQUAGGA)
AC_SUBST(WATCHFRR)
AC_SUBST(ISISD)
AC_SUBST(PIMD)
AC_SUBST(SOLARIS)
Expand Down Expand Up @@ -1548,7 +1548,7 @@ AC_DEFINE_UNQUOTED(PATH_LDPD_PID, "$frr_statedir/ldpd.pid",ldpd PID)
AC_DEFINE_UNQUOTED(LDPD_SOCKET, "$frr_statedir/ldpd.sock",ldpd control socket)
AC_DEFINE_UNQUOTED(PATH_ISISD_PID, "$frr_statedir/isisd.pid",isisd PID)
AC_DEFINE_UNQUOTED(PATH_PIMD_PID, "$frr_statedir/pimd.pid",pimd PID)
AC_DEFINE_UNQUOTED(PATH_WATCHQUAGGA_PID, "$frr_statedir/watchquagga.pid",watchquagga PID)
AC_DEFINE_UNQUOTED(PATH_WATCHFRR_PID, "$frr_statedir/watchfrr.pid",watchfrr PID)
AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$frr_statedir/zserv.api",zebra api socket)
AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$frr_statedir/zebra.vty",zebra vty socket)
AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$frr_statedir/ripd.vty",rip vty socket)
Expand All @@ -1559,7 +1559,7 @@ AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$frr_statedir/ospf6d.vty",ospf6d vty socke
AC_DEFINE_UNQUOTED(LDP_VTYSH_PATH, "$frr_statedir/ldpd.vty",ldpd vty socket)
AC_DEFINE_UNQUOTED(ISIS_VTYSH_PATH, "$frr_statedir/isisd.vty",isisd vty socket)
AC_DEFINE_UNQUOTED(PIM_VTYSH_PATH, "$frr_statedir/pimd.vty",pimd vty socket)
AC_DEFINE_UNQUOTED(WATCHQUAGGA_VTYSH_PATH, "$frr_statedir/watchquagga.vty",watchquagga vty socket)
AC_DEFINE_UNQUOTED(WATCHFRR_VTYSH_PATH, "$frr_statedir/watchfrr.vty",watchfrr vty socket)
AC_DEFINE_UNQUOTED(DAEMON_VTY_DIR, "$frr_statedir",daemon vty directory)

dnl autoconf does this, but it does it too late...
Expand Down Expand Up @@ -1605,7 +1605,7 @@ AC_CACHE_VAL(ac_cv_htonl_works,
AC_MSG_RESULT($ac_cv_htonl_works)

AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchquagga/Makefile
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchfrr/Makefile
ospf6d/Makefile ldpd/Makefile isisd/Makefile vtysh/Makefile
doc/Makefile ospfclient/Makefile tests/Makefile m4/Makefile
pimd/Makefile
Expand All @@ -1629,7 +1629,7 @@ AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile
doc/ripngd.8
doc/pimd.8
doc/vtysh.1
doc/watchquagga.8
doc/watchfrr.8
doc/zebra.8
doc/quagga.1
pkgsrc/bgpd.sh pkgsrc/ospf6d.sh pkgsrc/ospfd.sh
Expand Down
2 changes: 1 addition & 1 deletion cumulus/etc/quagga/daemons
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# When using "vtysh" such a config file is also needed. It should be owned by
# group "quaggavty" and set to ug=rw,o= though. Check /etc/pam.d/quagga, too.
#
# The watchquagga daemon is always started. Per default in monitoring-only but
# The watchfrr daemon is always started. Per default in monitoring-only but
# that can be changed via /etc/quagga/debian.conf.
#
zebra=no
Expand Down
4 changes: 2 additions & 2 deletions cumulus/etc/quagga/debian.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ isisd_options=" --daemon -A 127.0.0.1"
pimd_options=" --daemon -A 127.0.0.1"

# The list of daemons to watch is automatically generated by the init script.
watchquagga_enable=yes
watchquagga_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 30)
watchfrr_enable=yes
watchfrr_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 30)
2 changes: 1 addition & 1 deletion debian/quagga.install
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ usr/share/man/man8/ripd.8
usr/share/man/man8/ripngd.8
usr/share/man/man8/zebra.8
usr/share/man/man8/isisd.8
usr/share/man/man8/watchquagga.8
usr/share/man/man8/watchfrr.8
usr/share/snmp/mibs/
cumulus/etc/* etc/
tools/*.service lib/systemd/system
Expand Down
2 changes: 1 addition & 1 deletion debian/quagga.manpages
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ doc/ripngd.8
doc/vtysh.1
doc/zebra.8
doc/isisd.8
doc/watchquagga.8
doc/watchfrr.8
6 changes: 3 additions & 3 deletions debian/watchquagga.rc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
check process watchquagga with pidfile /var/run/quagga/watchquagga.pid
start program = "/etc/init.d/quagga start watchquagga" with timeout 120 seconds
stop program = "/etc/init.d/quagga stop watchquagga"
check process watchfrr with pidfile /var/run/quagga/watchfrr.pid
start program = "/etc/init.d/quagga start watchfrr" with timeout 120 seconds
stop program = "/etc/init.d/quagga stop watchfrr"
if 3 restarts within 10 cycles then timeout
6 changes: 3 additions & 3 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ if VTYSH
man_MANS += vtysh.1
endif

if WATCHQUAGGA
man_MANS += watchquagga.8
if WATCHFRR
man_MANS += watchfrr.8
endif

if ZEBRA
Expand All @@ -135,7 +135,7 @@ EXTRA_DIST = BGP-TypeCode draft-zebra-00.ms draft-zebra-00.txt \
ripngd.8.in \
pimd.8.in \
vtysh.1.in \
watchquagga.8.in \
watchfrr.8.in \
zebra.8.in \
quagga.1.in \
\
Expand Down
8 changes: 4 additions & 4 deletions doc/vtysh.texi
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ lost after doing a configuration save.
@end quotation

Since the @command{vtysh} command may be running as ordinary user on the
system, configuration writes will be tried through @command{watchquagga},
system, configuration writes will be tried through @command{watchfrr},
using the @command{write integrated} command internally. Since
@command{watchquagga} is running as superuser, @command{vtysh} is able to
@command{watchfrr} is running as superuser, @command{vtysh} is able to
ensure correct ownership and permissions on @file{Quagga.conf}.

If @command{watchquagga} is not running or the configuration write fails,
If @command{watchfrr} is not running or the configuration write fails,
@command{vtysh} will attempt to directly write to the file. This is likely
to fail if running as unprivileged user; alternatively it may leave the
file with incorrect owner or permissions.
Expand Down Expand Up @@ -147,7 +147,7 @@ installations.

Unconditionally (regardless of @command{service integrated-vtysh-config}
setting) write out integrated @file{Quagga.conf} file through
@command{watchquagga}. If @command{watchquagga} is not running, this command
@command{watchfrr}. If @command{watchfrr} is not running, this command
is unavailable.

@end deffn
Expand Down
28 changes: 14 additions & 14 deletions doc/watchquagga.8.in → doc/watchfrr.8.in
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
.\" This file was originally generated by help2man 1.36.
.TH WATCHQUAGGA 8 "July 2010"
.TH WATCHFRR 8 "July 2010"
.SH NAME
watchquagga \- a program to monitor the status of quagga daemons
watchfrr \- a program to monitor the status of frr daemons
.SH SYNOPSIS
.B watchquagga
.B watchfrr
.RI [ option ...]
.IR daemon ...
.br
.B watchquagga
.B watchfrr
.BR \-h " | " \-v
.SH DESCRIPTION
.B watchquagga
is a watchdog program that monitors the status of supplied quagga
.B watchfrr
is a watchdog program that monitors the status of supplied frr
.IR daemon s
and tries to restart them in case they become unresponsive or shut down.
.PP
To determine whether a daemon is running, it tries to connect to the
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 watchquagga can react immediately.
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: watchquagga \-d zebra ospfd bgpd
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: watchquagga \-dz \e
Example usage: watchfrr \-dz \e
.br
-R '/sbin/service zebra restart; /sbin/service ospfd restart' \e
.br
Expand All @@ -41,7 +41,7 @@ zebra ospfd
In this mode, whenever a single daemon hangs or crashes, the given command
is used to restart this daemon only.
.IP
Example usage: watchquagga \-dz \-r '/sbin/service %s restart' \e
Example usage: watchfrr \-dz \-r '/sbin/service %s restart' \e
.br
zebra ospfd bgpd
.TP
Expand All @@ -52,7 +52,7 @@ 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: watchquagga \-adz \-r '/sbin/service %s restart' \e
Example usage: watchfrr \-adz \-r '/sbin/service %s restart' \e
.br
\-s '/sbin/service %s start' \e
.br
Expand All @@ -63,7 +63,7 @@ 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: watchquagga \-Adz \-r '/sbin/service %s restart' \e
Example usage: watchfrr \-Adz \-r '/sbin/service %s restart' \e
.br
\-s '/sbin/service %s start' \e
.br
Expand Down Expand Up @@ -95,7 +95,7 @@ instead of standard output (stdout).
.BI \-S " directory" "\fR, \fB\-\-statedir " directory
Set the VTY socket
.I directory
(the default value is "/var/run/quagga").
(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
Expand Down Expand Up @@ -196,7 +196,7 @@ options to be specified.
.BI \-p " filename" "\fR, \fB\-\-pid\-file " filename
Set the process identifier
.I filename
(the default value is "/var/run/quagga/watchquagga.pid").
(the default value is "/var/run/frr/watchfrr.pid").
.TP
.BI \-b " string" "\fR, \fB\-\-blank\-string " string
When the supplied
Expand Down
2 changes: 1 addition & 1 deletion lib/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -4220,7 +4220,7 @@ install_default (enum node_type node)
*
* terminal = 0 -- vtysh / no logging, no config control
* terminal = 1 -- normal daemon
* terminal = -1 -- watchquagga / no logging, but minimal config control */
* terminal = -1 -- watchfrr / no logging, but minimal config control */
void
cmd_init (int terminal)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const char *zlog_proto_names[] =
"ISIS",
"PIM",
"RFP",
"WATCHQUAGGA",
"WATCHFRR",
NULL,
};

Expand Down
2 changes: 1 addition & 1 deletion lib/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ typedef enum
ZLOG_ISIS,
ZLOG_PIM,
ZLOG_RFP,
ZLOG_WATCHQUAGGA,
ZLOG_WATCHFRR,
} zlog_proto_t;

/* If maxlvl is set to ZLOG_DISABLED, then no messages will be sent
Expand Down
2 changes: 1 addition & 1 deletion lib/vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ vtysh_read (struct thread *thread)
if (ret == CMD_SUSPEND)
break;

/* warning: watchquagga hardcodes this result write */
/* warning: watchfrr hardcodes this result write */
header[3] = ret;
buffer_put(vty->obuf, header, 4);

Expand Down
2 changes: 1 addition & 1 deletion redhat/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ EXTRA_DIST = bgpd.init isisd.init \
ospf6d.init ospfd.init ldpd.init \
quagga.logrotate quagga.pam quagga.spec \
quagga.sysconfig ripd.init ripngd.init \
watchquagga.init pimd.init zebra.init \
watchfrr.init pimd.init zebra.init \
README.rpm_build.md

12 changes: 6 additions & 6 deletions redhat/README.rpm_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Building your own Quagga RPM
%{!?quagga_user: %global quagga_user quagga }
%{!?vty_group: %global vty_group quaggavt }
%{!?with_fpm: %global with_fpm 0 }
%{!?with_watchquagga: %global with_watchquagga 1 }
%{!?with_watchfrr: %global with_watchfrr 1 }

6. Build the RPM

Expand All @@ -84,11 +84,11 @@ Enabling daemons after installation of the package:
chkconfig bgpd on
... etc

2. If you want to run `watchquagga`, then configure `/etc/sysconfig/quagga`
and uncomment the line with the daemons for `watchquagga` to monitor,
then enable watchquagga
2. If you want to run `watchfrr`, then configure `/etc/sysconfig/quagga`
and uncomment the line with the daemons for `watchfrr` to monitor,
then enable watchfrr

chkconfig watchquagga on
chkconfig watchfrr on

3. Check your firewall / IPtables to make sure the routing protocols are
allowed.
Expand All @@ -113,7 +113,7 @@ Configuration is stored in `/etc/quagga/*.conf` files.
systemctl enable bgpd
... etc

Note: There is no watchquagga on systemd based systems. Systemd contains
Note: There is no watchfrr on systemd based systems. Systemd contains
the functionality of monitoring and restarting daemons.

2. Check your firewall / IPtables to make sure the routing protocols are
Expand Down
Loading

0 comments on commit 9473e34

Please sign in to comment.