]> git.puffer.fish Git - matthieu/frr.git/commit
ospf6d: add support for unplanned graceful restart
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 3 Mar 2023 16:09:20 +0000 (13:09 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 9 May 2023 00:47:44 +0000 (21:47 -0300)
commit88b3d5e5144fc6422c600e56e419231ce630f869
tree6b43e13096bfa43ab8dcce98a7f6e48e1e2844a3
parentab749e7eeac408fb2b99ead5c84377a689116646
ospf6d: add support for unplanned graceful restart

In practical terms, unplanned GR refers to the act of recovering
from a software crash without affecting the forwarding plane.

Unplanned GR and Planned GR work virtually the same, except for the
following difference: on planned GR, the router sends the Grace-LSAs
*before* restarting, whereas in unplanned GR the router sends the
Grace-LSAs immediately *after* restarting.

For unplanned GR to work, ospf6d was modified to send a
ZEBRA_CLIENT_GR_CAPABILITIES message to zebra as soon as GR is
enabled.  This causes zebra to freeze the OSPF routes in the RIB as
soon as the ospf6d daemon dies, for as long as the configured grace
period (the defaults is 120 seconds). Similarly, ospf6d now stores in
non-volatile memory that GR is enabled as soon as GR is configured.
Those two things are no longer done during the GR preparation phase,
which only happens for planned GRs.

Unplanned GR will only take effect when the daemon is killed
abruptly (e.g. SIGSEGV, SIGKILL), otherwise all OSPF routes will be
uninstalled while ospf6d is exiting.  Once ospf6d starts, it will
check whether GR is enabled and enter in the GR mode if necessary,
sending Grace-LSAs out all operational interfaces.

One disadvantage of unplanned GR is that the neighboring routers
might time out their corresponding adjacencies if ospf6d takes too
long to come back up. This is especially the case when short dead
intervals are used (or BFD). For this and other reasons, planned
GR should be preferred whenever possible.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
doc/user/ospf6d.rst
ospf6d/ospf6_gr.c
ospf6d/ospf6_gr.h
ospf6d/ospf6_interface.c
ospf6d/ospf6_spf.c
ospf6d/ospf6_top.c
ospf6d/ospf6_top.h
ospf6d/ospf6_zebra.c