]> git.proxmox.com Git - mirror_frr.git/commitdiff
doc, zebra: Remove `keep_kernel_mode` from zebra
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 11 May 2019 07:50:11 +0000 (03:50 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 23 May 2019 23:36:41 +0000 (19:36 -0400)
This code doees this:

a) Imagine ospf installs a route into zebra.  Zebra crashes and
we restart FRR.  If we are using the -k option on zebra than
all routes are re-read in, including this OSPF route.
b) Now imagine at the same time that zebra is starting backup
ospf on a different router looses a link to the this route.
c) Since zebra was run with -k this OSPF route is read back
in but never replaced and we now have a route pointing out
an interface to other routers that cannot handle it.

We should never allow users to implement bad options from zebra's
perspective that allow them to put themselves into a clear problem
state and additionally we have *absolutely* no mechanism to ever
fix that broken route without special human interaction.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
doc/user/zebra.rst
zebra/main.c

index 59fcad4cd9c7cf51d8390ba54ac5c07355c1da46..40d89492972531ea2ab26cce40d2d9c21f296ddd 100644 (file)
@@ -23,10 +23,6 @@ Besides the common invocation options (:ref:`common-invocation-options`), the
    Runs in batch mode. *zebra* parses configuration file and terminates
    immediately.
 
-.. option:: -k, --keep_kernel
-
-   When zebra starts up, don't delete old self inserted routes.
-
 .. option:: -K TIME, --graceful_restart TIME
 
    If this option is specified, the graceful restart time is TIME seconds.
index af1f6084b3f1b0ba942597ecc2ae40dd6dbb66fb..5797a5846aa8ef6f398a4148636cc7aa0e030cc6 100644 (file)
@@ -74,9 +74,6 @@ int retain_mode = 0;
 /* Allow non-quagga entities to delete quagga routes */
 int allow_delete = 0;
 
-/* Don't delete kernel route. */
-int keep_kernel_mode = 0;
-
 int graceful_restart;
 
 bool v6_rr_semantics = false;
@@ -272,7 +269,7 @@ int main(int argc, char **argv)
        frr_preinit(&zebra_di, argc, argv);
 
        frr_opt_add(
-               "bakz:e:l:o:rK:"
+               "baz:e:l:o:rK:"
 #ifdef HAVE_NETLINK
                "s:n"
 #endif
@@ -289,7 +286,6 @@ int main(int argc, char **argv)
                "  -z, --socket             Set path of zebra socket\n"
                "  -e, --ecmp               Specify ECMP to use.\n"
                "  -l, --label_socket       Socket to external label manager\n"
-               "  -k, --keep_kernel        Don't delete old routes which were installed by zebra.\n"
                "  -r, --retain             When program terminates, retain added route by zebra.\n"
                "  -o, --vrfdefaultname     Set default VRF name.\n"
                "  -K, --graceful_restart   Graceful restart at the kernel level, timer in seconds for expiration\n"
@@ -321,13 +317,6 @@ int main(int argc, char **argv)
                case 'a':
                        allow_delete = 1;
                        break;
-               case 'k':
-                       if (graceful_restart) {
-                               zlog_err("Graceful Restart initiated, we cannot keep the existing kernel routes");
-                               return 1;
-                       }
-                       keep_kernel_mode = 1;
-                       break;
                case 'e':
                        zrouter.multipath_num = atoi(optarg);
                        if (zrouter.multipath_num > MULTIPATH_NUM
@@ -358,10 +347,6 @@ int main(int argc, char **argv)
                        retain_mode = 1;
                        break;
                case 'K':
-                       if (keep_kernel_mode) {
-                               zlog_err("Keep Kernel mode specified, graceful restart incompatible");
-                               return 1;
-                       }
                        graceful_restart = atoi(optarg);
                        break;
 #ifdef HAVE_NETLINK
@@ -452,9 +437,8 @@ int main(int argc, char **argv)
        * we have to have route_read() called before.
        */
        zrouter.startup_time = monotime(NULL);
-       if (!keep_kernel_mode)
-               thread_add_timer(zrouter.master, rib_sweep_route,
-                                NULL, graceful_restart, NULL);
+       thread_add_timer(zrouter.master, rib_sweep_route,
+                        NULL, graceful_restart, NULL);
 
        /* Needed for BSD routing socket. */
        pid = getpid();