]> git.puffer.fish Git - mirror/frr.git/commit
initd: initd-mi.patch
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:03:41 +0000 (18:03 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:03:41 +0000 (18:03 -0700)
commit8c5fbd4858f48557cbb78e3d29f3be3d5d2cd24f
tree5442807ac06d217e8ebbbfa38aea3d98bd4ea7f6
parenta231c1d588ae46d17fa62702bb50be4149b1bdf1
initd: initd-mi.patch

Support Multi-Instance protocol daemons initd

OSPFd is the first of the multi-instance daemons. This patch allows the
starting, stopping, restarting and monitoring of multiple instances of
the same protocol daemon.

Multiple instances are specified in the daemons file using a new variable:
ospfd_instances="1,2"

Absence of this variable means ospfd will start in legacy, single instance
mode. The original "ospfd=yes" line is still required.

Daemons are started with the "-n <instance>" option. Each daemon is named
"<daemon>-<instance>", for example "ospfd-1", "ospfd-2" etc. Similarly,
pid files are ospfd-1.pid and vty files are named ospfd-1.vty.

We're also introducing a new file, /etc/default/quagga to store the
default value for the maximum instances associated with a daemon.

watchquagga and others are unmodified and everything else just works once
this code is in place.

The code has been enhanced to support restarting watchquagga with only the
updated daemons when an individual daemon is stopped or started. For example,
without this patch, stopping just bgpd would terminate watchquagga even if
ospfd and zebra are still running. Similarly, starting just bgpd when ospfd
and zebra are running wouldn't update watchquagga to include bgpd. Furthermore,
when the daemons file is modified and a daemon is no longer deemed necessary
and quagga restarted, the daemon is not killed. For example, switching
ospfd=yes to ospfd=no and restarting the quagga will leave ospfd daemon
running. This case is also fixed with this patch.

However, adding a new instance to the ospfd_instances file and starting
just that instance will start just that instance and add it to watchquagga.
Similarly, a single instance maybe stopped or restarted.

Caveat emptor: With multi-instance daemons, stopping a single instance and then
starting a different instance will cause all instances to be monitored by
watchquagga i.e. all instances will be restarted, if necessary.

Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
debian/quagga.default [new file with mode: 0644]
debian/quagga.init.d