diff options
26 files changed, 123 insertions, 162 deletions
diff --git a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py index 8525838d96..2a00398e28 100755 --- a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py +++ b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py @@ -126,7 +126,7 @@ def setup_module(module): net['r%s' % i].loadConf('pbrd', '%s/r%s/pbrd.conf' % (thisDir, i)) net['r%s' % i].startRouter() - # For debugging after starting Quagga/FRR daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -148,7 +148,7 @@ def test_router_running(): if (fatal_error != ""): pytest.skip(fatal_error) - print("\n\n** Check if FRR/Quagga is running on each Router node") + print("\n\n** Check if FRR is running on each Router node") print("******************************************\n") sleep(5) @@ -157,7 +157,7 @@ def test_router_running(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -213,7 +213,7 @@ def test_error_messages_vtysh(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -295,7 +295,7 @@ def test_error_messages_daemons(): assert error_logs == "", "Daemons report errors to StdErr" - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -363,7 +363,7 @@ def test_converge_protocols(): assert failures == 0, "IPv6 Routing table failed for r%s\n%s" % (i, diff) - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line ## CLI(net) def route_get_nhg_id(route_str): @@ -527,7 +527,7 @@ def test_rip_status(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -582,7 +582,7 @@ def test_ripng_status(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -646,7 +646,7 @@ def test_ospfv2_interfaces(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -701,7 +701,7 @@ def test_isis_interfaces(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -782,7 +782,7 @@ def test_bgp_summary(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -864,7 +864,7 @@ def test_bgp_ipv6_summary(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -927,7 +927,7 @@ def test_bgp_ipv4(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -989,7 +989,7 @@ def test_bgp_ipv6(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) def test_route_map(): @@ -1155,7 +1155,7 @@ def test_mpls_interfaces(): fatal_error = net['r%s' % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) diff --git a/tests/topotests/bfd-bgp-cbit-topo3/test_bfd_bgp_cbit_topo3.py b/tests/topotests/bfd-bgp-cbit-topo3/test_bfd_bgp_cbit_topo3.py index 7d1521c8b2..595132214b 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/test_bfd_bgp_cbit_topo3.py +++ b/tests/topotests/bfd-bgp-cbit-topo3/test_bfd_bgp_cbit_topo3.py @@ -21,7 +21,7 @@ # """ -test_bfd_bgp_cbit_topo3.py: Test the FRR/Quagga BFD daemon with multihop and BGP +test_bfd_bgp_cbit_topo3.py: Test the FRR BFD daemon with multihop and BGP unnumbered. """ diff --git a/tests/topotests/bfd-topo1/test_bfd_topo1.py b/tests/topotests/bfd-topo1/test_bfd_topo1.py index 5306fdf353..6e589d55eb 100644 --- a/tests/topotests/bfd-topo1/test_bfd_topo1.py +++ b/tests/topotests/bfd-topo1/test_bfd_topo1.py @@ -23,7 +23,7 @@ # """ -test_bfd_topo1.py: Test the FRR/Quagga BFD daemon. +test_bfd_topo1.py: Test the FRR BFD daemon. """ import os diff --git a/tests/topotests/bfd-topo2/test_bfd_topo2.py b/tests/topotests/bfd-topo2/test_bfd_topo2.py index 2c5ce3e4c3..feb4576bd3 100644 --- a/tests/topotests/bfd-topo2/test_bfd_topo2.py +++ b/tests/topotests/bfd-topo2/test_bfd_topo2.py @@ -23,7 +23,7 @@ # """ -test_bfd_topo2.py: Test the FRR/Quagga BFD daemon with multihop and BGP +test_bfd_topo2.py: Test the FRR BFD daemon with multihop and BGP unnumbered. """ diff --git a/tests/topotests/bfd-vrf-topo1/test_bfd_vrf_topo1.py b/tests/topotests/bfd-vrf-topo1/test_bfd_vrf_topo1.py index 95595ecba4..5fed135f8d 100644 --- a/tests/topotests/bfd-vrf-topo1/test_bfd_vrf_topo1.py +++ b/tests/topotests/bfd-vrf-topo1/test_bfd_vrf_topo1.py @@ -24,7 +24,7 @@ # """ -test_bfd_vrf_topo1.py: Test the FRR/Quagga BFD daemon. +test_bfd_vrf_topo1.py: Test the FRR BFD daemon. """ import os diff --git a/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py b/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py index 69ef7e9fae..3ad989c601 100755 --- a/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py +++ b/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py @@ -22,7 +22,7 @@ # """ - test_bgp_evpn.py: Test the FRR/Quagga BGP daemon with BGP IPv6 interface + test_bgp_evpn.py: Test the FRR BGP daemon with BGP IPv6 interface with route advertisements on a separate netns. """ diff --git a/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py b/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py index 0acf8d2dbc..783e746418 100644 --- a/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py +++ b/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py @@ -22,7 +22,7 @@ # """ - test_bgp_ipv6_rtadv.py: Test the FRR/Quagga BGP daemon with BGP IPv6 interface + test_bgp_ipv6_rtadv.py: Test the FRR BGP daemon with BGP IPv6 interface with route advertisements on a separate netns. """ diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py b/tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py index 05db9ab14b..752e37f5f8 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py @@ -22,7 +22,7 @@ # """ -customize.py: Simple FRR/Quagga MPLS L3VPN test topology +customize.py: Simple FRR MPLS L3VPN test topology | +----+----+ diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py index fb919f02d0..1c3c51f68e 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py @@ -22,7 +22,7 @@ # """ -customize.py: Simple FRR/Quagga MPLS L3VPN test topology +customize.py: Simple FRR MPLS L3VPN test topology | +----+----+ diff --git a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py index a2020ffa55..6344f7bb40 100755 --- a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py +++ b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py @@ -23,7 +23,7 @@ # """ -test_bgp_multiview_topo1.py: Simple Quagga/FRR Route-Server Test +test_bgp_multiview_topo1.py: Simple FRR Route-Server Test +----------+ +----------+ +----------+ +----------+ +----------+ | peer1 | | peer2 | | peer3 | | peer4 | | peer5 | @@ -165,7 +165,7 @@ def setup_module(module): print("peer%s" % i), print("") - # For debugging after starting Quagga/FRR daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -193,7 +193,7 @@ def test_router_running(): if fatal_error != "": pytest.skip(fatal_error) - print("\n\n** Check if FRR/Quagga is running on each Router node") + print("\n\n** Check if FRR is running on each Router node") print("******************************************\n") # Starting Routers @@ -201,7 +201,7 @@ def test_router_running(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -262,7 +262,7 @@ def test_bgp_converge(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting Quagga/FRR daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -300,7 +300,7 @@ def test_bgp_routingTable(): .rstrip() ) - # Fix inconsitent spaces between 0.99.24 and newer versions of Quagga... + # Fix inconsitent spaces between 0.99.24 and newer versions actual = re.sub("0 0", "0 0", actual) actual = re.sub( r"([0-9]) 32768", r"\1 32768", actual @@ -347,7 +347,7 @@ def test_bgp_routingTable(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) diff --git a/tests/topotests/bgp_rfapi_basic_sanity/customize.py b/tests/topotests/bgp_rfapi_basic_sanity/customize.py index ea548a7337..2c85cf6e9d 100644 --- a/tests/topotests/bgp_rfapi_basic_sanity/customize.py +++ b/tests/topotests/bgp_rfapi_basic_sanity/customize.py @@ -23,7 +23,7 @@ # """ -customize.py: Simple FRR/Quagga MPLS L3VPN test topology +customize.py: Simple FRR MPLS L3VPN test topology +---------+ | r1 | diff --git a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py index 50b9b092d6..97d98415db 100644 --- a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py +++ b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py @@ -22,7 +22,7 @@ # """ - test_bgp_ipv6_rtadv.py: Test the FRR/Quagga BGP daemon with BGP IPv6 interface + test_bgp_ipv6_rtadv.py: Test the FRR BGP daemon with BGP IPv6 interface with route advertisements on a separate netns. """ diff --git a/tests/topotests/ldp-oc-acl-topo1/test_ldp_oc_acl_topo1.py b/tests/topotests/ldp-oc-acl-topo1/test_ldp_oc_acl_topo1.py index dadb2065e6..3b3ed3383c 100644 --- a/tests/topotests/ldp-oc-acl-topo1/test_ldp_oc_acl_topo1.py +++ b/tests/topotests/ldp-oc-acl-topo1/test_ldp_oc_acl_topo1.py @@ -22,7 +22,7 @@ # """ -test_ldp_oc_acl_topo1.py: Simple FRR/Quagga LDP Test +test_ldp_oc_acl_topo1.py: Simple FRR LDP Test +---------+ | r1 | diff --git a/tests/topotests/ldp-oc-topo1/test_ldp_oc_topo1.py b/tests/topotests/ldp-oc-topo1/test_ldp_oc_topo1.py index ea449e4aba..ead991b183 100644 --- a/tests/topotests/ldp-oc-topo1/test_ldp_oc_topo1.py +++ b/tests/topotests/ldp-oc-topo1/test_ldp_oc_topo1.py @@ -22,7 +22,7 @@ # """ -test_ldp_oc_topo1.py: Simple FRR/Quagga LDP Test +test_ldp_oc_topo1.py: Simple FRR LDP Test +---------+ | r1 | diff --git a/tests/topotests/ldp-topo1/test_ldp_topo1.py b/tests/topotests/ldp-topo1/test_ldp_topo1.py index cef4d6587e..31adeafbf6 100755 --- a/tests/topotests/ldp-topo1/test_ldp_topo1.py +++ b/tests/topotests/ldp-topo1/test_ldp_topo1.py @@ -23,7 +23,7 @@ # """ -test_ldp_topo1.py: Simple FRR/Quagga LDP Test +test_ldp_topo1.py: Simple FRR LDP Test +---------+ | r1 | @@ -186,7 +186,7 @@ def setup_module(module): if fatal_error != "": break - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -208,7 +208,7 @@ def test_router_running(): if fatal_error != "": pytest.skip(fatal_error) - print("\n\n** Check if FRR/Quagga is running on each Router node") + print("\n\n** Check if FRR is running on each Router node") print("******************************************\n") sleep(5) @@ -217,7 +217,7 @@ def test_router_running(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -283,7 +283,7 @@ def test_mpls_interfaces(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -420,7 +420,7 @@ def test_mpls_ldp_discovery(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -490,7 +490,7 @@ def test_mpls_ldp_neighbor(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -582,7 +582,7 @@ def test_mpls_ldp_binding(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -612,7 +612,7 @@ def test_zebra_ipv4_routingTable(): .cmd('vtysh -c "show ip route" 2> /dev/null | grep "^O"') .rstrip() ) - # Drop timers on end of line (older Quagga Versions) + # Drop timers on end of line actual = re.sub(r", [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", "", actual) # Mask out label - all LDP labels should be >= 10 (2-digit) @@ -657,7 +657,7 @@ def test_zebra_ipv4_routingTable(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -736,7 +736,7 @@ def test_mpls_table(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -820,7 +820,7 @@ def test_linux_mpls_routes(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index b9f82877e2..171a894b35 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -96,7 +96,6 @@ def set_topogen(tgen): tgen_defaults = { "verbosity": "info", "frrdir": "/usr/lib/frr", - "quaggadir": "/usr/lib/quagga", "routertype": "frr", "memleak_path": None, } @@ -173,7 +172,7 @@ class Topogen(object): options: * `name`: (optional) select the router name * `daemondir`: (optional) custom daemon binary directory - * `routertype`: (optional) `quagga` or `frr` + * `routertype`: (optional) `frr` Returns a TopoRouter. """ if name is None: @@ -182,7 +181,6 @@ class Topogen(object): raise KeyError("router already exists") params["frrdir"] = self.config.get(self.CONFIG_SECTION, "frrdir") - params["quaggadir"] = self.config.get(self.CONFIG_SECTION, "quaggadir") params["memleak_path"] = self.config.get(self.CONFIG_SECTION, "memleak_path") if not params.has_key("routertype"): params["routertype"] = self.config.get(self.CONFIG_SECTION, "routertype") @@ -529,12 +527,10 @@ class TopoRouter(TopoGear): Router abstraction. """ - # The default required directories by Quagga/FRR + # The default required directories by FRR PRIVATE_DIRS = [ "/etc/frr", - "/etc/quagga", "/var/run/frr", - "/var/run/quagga", "/var/log", ] @@ -581,7 +577,7 @@ class TopoRouter(TopoGear): * cls: router class that will be used to instantiate * name: router name * daemondir: daemon binary directory - * routertype: 'quagga' or 'frr' + * routertype: 'frr' """ super(TopoRouter, self).__init__() self.tgen = tgen @@ -626,7 +622,7 @@ class TopoRouter(TopoGear): except OSError: pass - # Allow unprivileged daemon user (frr/quagga) to create log files + # Allow unprivileged daemon user (frr) to create log files try: # Only allow group, if it exist. gid = grp.getgrnam(self.routertype)[2] @@ -675,7 +671,7 @@ class TopoRouter(TopoGear): * Load modules * Clean up files * Configure interfaces - * Start daemons (e.g. FRR/Quagga) + * Start daemons (e.g. FRR) * Configure daemon logging files """ self.logger.debug("starting") @@ -724,7 +720,7 @@ class TopoRouter(TopoGear): def startDaemons(self, daemons): """ Start Daemons: to start specific daemon(user defined daemon only) - * Start daemons (e.g. FRR/Quagga) + * Start daemons (e.g. FRR) * Configure daemon logging files """ self.logger.debug('starting') @@ -1041,12 +1037,10 @@ def diagnose_env_linux(): # Assert that FRR utilities exist frrdir = config.get("topogen", "frrdir") - hasfrr = False if not os.path.isdir(frrdir): logger.error("could not find {} directory".format(frrdir)) ret = False else: - hasfrr = True try: pwd.getpwnam("frr")[2] except KeyError: @@ -1095,56 +1089,6 @@ def diagnose_env_linux(): os.system("{} -v 2>&1 >/tmp/topotests/frr_zebra.txt".format(path)) - # Assert that Quagga utilities exist - quaggadir = config.get("topogen", "quaggadir") - if hasfrr: - # if we have frr, don't check for quagga - pass - elif not os.path.isdir(quaggadir): - logger.info( - "could not find {} directory (quagga tests will not run)".format(quaggadir) - ) - else: - ret = True - try: - pwd.getpwnam("quagga")[2] - except KeyError: - logger.info('could not find "quagga" user') - - try: - grp.getgrnam("quagga")[2] - except KeyError: - logger.info('could not find "quagga" group') - - try: - if "quagga" not in grp.getgrnam("quaggavty").gr_mem: - logger.error( - '"quagga" user and group exist, but user is not under "quaggavty"' - ) - except KeyError: - logger.warning('could not find "quaggavty" group') - - for fname in [ - "zebra", - "ospfd", - "ospf6d", - "bgpd", - "ripd", - "ripngd", - "isisd", - "pimd", - "pbrd" - ]: - path = os.path.join(quaggadir, fname) - if not os.path.isfile(path): - logger.warning("could not find {} in {}".format(fname, quaggadir)) - ret = False - else: - if fname != "zebra": - continue - - os.system("{} -v 2>&1 >/tmp/topotests/quagga_zebra.txt".format(path)) - # Test MPLS availability krel = platform.release() if topotest.version_cmp(krel, "4.5") < 0: diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index e34d1cf0be..d26e7c8881 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -947,13 +947,11 @@ def checkAddressSanitizerError(output, router, component): def addRouter(topo, name): - "Adding a FRRouter (or Quagga) to Topology" + "Adding a FRRouter to Topology" MyPrivateDirs = [ "/etc/frr", - "/etc/quagga", "/var/run/frr", - "/var/run/quagga", "/var/log", ] if sys.platform.startswith("linux"): @@ -985,7 +983,7 @@ def assert_sysctl(node, sysctl, value): class Router(Node): - "A Node with IPv4/IPv6 forwarding enabled and Quagga as Routing Engine" + "A Node with IPv4/IPv6 forwarding enabled" def __init__(self, name, **params): super(Router, self).__init__(name, **params) @@ -997,7 +995,6 @@ class Router(Node): { "verbosity": "info", "frrdir": "/usr/lib/frr", - "quaggadir": "/usr/lib/quagga", "routertype": "frr", "memleak_path": None, } @@ -1055,18 +1052,6 @@ class Router(Node): if not os.path.isfile(zebra_path): raise Exception("FRR zebra binary doesn't exist at {}".format(zebra_path)) - def _config_quagga(self, **params): - "Configure Quagga binaries" - self.daemondir = params.get("quaggadir") - if self.daemondir is None: - self.daemondir = self.config_defaults.get("topogen", "quaggadir") - - zebra_path = os.path.join(self.daemondir, "zebra") - if not os.path.isfile(zebra_path): - raise Exception( - "Quagga zebra binary doesn't exist at {}".format(zebra_path) - ) - # pylint: disable=W0221 # Some params are only meaningful for the parent class. def config(self, **params): @@ -1078,10 +1063,7 @@ class Router(Node): self.routertype = params.get( "routertype", self.config_defaults.get("topogen", "routertype") ) - if self.routertype == "quagga": - self._config_quagga(**params) - else: - self._config_frr(**params) + self._config_frr(**params) else: # Test the provided path zpath = os.path.join(self.daemondir, "zebra") @@ -1340,7 +1322,9 @@ class Router(Node): # If `daemons` was specified then some upper API called us with # specific daemons, otherwise just use our own configuration. daemons_list = [] - if daemons is None: + if daemons != None: + daemons_list = daemons + else: # Append all daemons configured. for daemon in self.daemons: if self.daemons[daemon] == 1: @@ -1406,7 +1390,7 @@ class Router(Node): def killRouterDaemons( self, daemons, wait=True, assertOnError=True, minErrorVersion="5.1" ): - # Kill Running Quagga or FRR specific + # Kill Running FRR # Daemons(user specified daemon only) using SIGKILL rundaemons = self.cmd("ls -1 /var/run/%s/*.pid" % self.routertype) errors = "" @@ -1668,7 +1652,7 @@ class Router(Node): return True def get_routertype(self): - "Return the type of Router (frr or quagga)" + "Return the type of Router (frr)" return self.routertype diff --git a/tests/topotests/ospf-topo1-vrf/test_ospf_topo1_vrf.py b/tests/topotests/ospf-topo1-vrf/test_ospf_topo1_vrf.py index 4ec09b10d3..6d44d02e5e 100644 --- a/tests/topotests/ospf-topo1-vrf/test_ospf_topo1_vrf.py +++ b/tests/topotests/ospf-topo1-vrf/test_ospf_topo1_vrf.py @@ -23,7 +23,7 @@ # """ -test_ospf_topo1.py: Test the FRR/Quagga OSPF routing daemon. +test_ospf_topo1.py: Test the FRR OSPF routing daemon. """ import os diff --git a/tests/topotests/ospf-topo1/test_ospf_topo1.py b/tests/topotests/ospf-topo1/test_ospf_topo1.py index 3af60fd48f..95193afb2a 100644 --- a/tests/topotests/ospf-topo1/test_ospf_topo1.py +++ b/tests/topotests/ospf-topo1/test_ospf_topo1.py @@ -23,7 +23,7 @@ # """ -test_ospf_topo1.py: Test the FRR/Quagga OSPF routing daemon. +test_ospf_topo1.py: Test the FRR OSPF routing daemon. """ import os diff --git a/tests/topotests/pytest.ini b/tests/topotests/pytest.ini index 77b8c2b478..2e9c4901bc 100644 --- a/tests/topotests/pytest.ini +++ b/tests/topotests/pytest.ini @@ -19,10 +19,9 @@ norecursedirs = .git example-test example-topojson-test lib docker evpn_type5_te # Default daemons binaries path. #frrdir = /usr/lib/frr -#quaggadir = /usr/lib/quagga # Default router type to use. Possible values are: -# 'frr' and 'quagga'. +# 'frr' #routertype = frr # Memory leak test reports path diff --git a/tests/topotests/rip-topo1/test_rip_topo1.py b/tests/topotests/rip-topo1/test_rip_topo1.py index 3098812a24..7ff18ba524 100755 --- a/tests/topotests/rip-topo1/test_rip_topo1.py +++ b/tests/topotests/rip-topo1/test_rip_topo1.py @@ -127,7 +127,7 @@ def setup_module(module): net["r%s" % i].loadConf("ripd", "%s/r%s/ripd.conf" % (thisDir, i)) net["r%s" % i].startRouter() - # For debugging after starting Quagga/FRR daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -149,7 +149,7 @@ def test_router_running(): if fatal_error != "": pytest.skip(fatal_error) - print("\n\n** Check if FRR/Quagga is running on each Router node") + print("\n\n** Check if FRR is running on each Router node") print("******************************************\n") # Make sure that all daemons are running @@ -157,7 +157,7 @@ def test_router_running(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -182,7 +182,7 @@ def test_converge_protocols(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -243,7 +243,7 @@ def test_rip_status(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -298,7 +298,7 @@ def test_rip_routes(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -330,7 +330,7 @@ def test_zebra_ipv4_routingTable(): .cmd('vtysh -c "show ip route" 2> /dev/null | grep "^R"') .rstrip() ) - # Drop timers on end of line (older Quagga Versions) + # Drop timers on end of line actual = re.sub(r", [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", "", actual) # Fix newlines (make them all the same) actual = ("\n".join(actual.splitlines()) + "\n").splitlines(1) @@ -362,7 +362,7 @@ def test_zebra_ipv4_routingTable(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) diff --git a/tests/topotests/ripng-topo1/test_ripng_topo1.py b/tests/topotests/ripng-topo1/test_ripng_topo1.py index 23e689235c..2976cdefe4 100755 --- a/tests/topotests/ripng-topo1/test_ripng_topo1.py +++ b/tests/topotests/ripng-topo1/test_ripng_topo1.py @@ -127,7 +127,7 @@ def setup_module(module): net["r%s" % i].loadConf("ripngd", "%s/r%s/ripngd.conf" % (thisDir, i)) net["r%s" % i].startRouter() - # For debugging after starting Quagga/FRR daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -149,7 +149,7 @@ def test_router_running(): if fatal_error != "": pytest.skip(fatal_error) - print("\n\n** Check if FRR/Quagga is running on each Router node") + print("\n\n** Check if FRR is running on each Router node") print("******************************************\n") # Starting Routers @@ -157,7 +157,7 @@ def test_router_running(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -182,7 +182,7 @@ def test_converge_protocols(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -250,7 +250,7 @@ def test_ripng_status(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -317,7 +317,7 @@ def test_ripng_routes(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) @@ -351,7 +351,7 @@ def test_zebra_ipv6_routingTable(): ) # Mask out Link-Local mac address portion. They are random... actual = re.sub(r" fe80::[0-9a-f:]+", " fe80::XXXX:XXXX:XXXX:XXXX", actual) - # Drop timers on end of line (older Quagga Versions) + # Drop timers on end of line actual = re.sub(r", [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", "", actual) # Fix newlines (make them all the same) actual = ("\n".join(actual.splitlines()) + "\n").splitlines(1) @@ -383,7 +383,7 @@ def test_zebra_ipv6_routingTable(): fatal_error = net["r%s" % i].checkRouterRunning() assert fatal_error == "", fatal_error - # For debugging after starting FRR/Quagga daemons, uncomment the next line + # For debugging after starting FRR daemons, uncomment the next line # CLI(net) diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index 2567171c5e..797964bf88 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -2099,7 +2099,7 @@ int zebra_evpn_mh_neigh_holdtime_update(struct vty *vty, uint32_t duration, bool set_default) { if (set_default) - zmh_info->neigh_hold_time = EVPN_MH_NEIGH_HOLD_TIME_DEF; + duration = EVPN_MH_NEIGH_HOLD_TIME_DEF; zmh_info->neigh_hold_time = duration; diff --git a/zebra/zebra_evpn_neigh.c b/zebra/zebra_evpn_neigh.c index 661d1c7f81..6a76a475e6 100644 --- a/zebra/zebra_evpn_neigh.c +++ b/zebra/zebra_evpn_neigh.c @@ -614,6 +614,9 @@ int zebra_evpn_neigh_del(zebra_evpn_t *zevpn, zebra_neigh_t *n) /* Cancel auto recovery */ THREAD_OFF(n->dad_ip_auto_recovery_timer); + /* Cancel proxy hold timer */ + zebra_evpn_neigh_stop_hold_timer(n); + /* Free the VNI hash entry and allocated memory. */ tmp_n = hash_release(zevpn->neigh_table, n); XFREE(MTYPE_NEIGH, tmp_n); diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index b8faaa43fd..aabbd875ec 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1366,7 +1366,6 @@ static struct nhg_hash_entry *depends_find_singleton(const struct nexthop *nh, static struct nhg_hash_entry *depends_find(const struct nexthop *nh, afi_t afi) { struct nhg_hash_entry *nhe = NULL; - char rbuf[10]; if (!nh) goto done; @@ -1374,18 +1373,18 @@ static struct nhg_hash_entry *depends_find(const struct nexthop *nh, afi_t afi) /* We are separating these functions out to increase handling speed * in the non-recursive case (by not alloc/freeing) */ - if (CHECK_FLAG(nh->flags, NEXTHOP_FLAG_RECURSIVE)) { + if (CHECK_FLAG(nh->flags, NEXTHOP_FLAG_RECURSIVE)) nhe = depends_find_recursive(nh, afi); - strlcpy(rbuf, "(R)", sizeof(rbuf)); - } else { + else nhe = depends_find_singleton(nh, afi); - rbuf[0] = '\0'; - } - if (IS_ZEBRA_DEBUG_NHG_DETAIL) - zlog_debug("%s: nh %pNHv %s => %p (%u)", - __func__, nh, rbuf, + + if (IS_ZEBRA_DEBUG_NHG_DETAIL) { + zlog_debug("%s: nh %pNHv %s => %p (%u)", __func__, nh, + CHECK_FLAG(nh->flags, NEXTHOP_FLAG_RECURSIVE) ? "(R)" + : "", nhe, nhe ? nhe->id : 0); + } done: return nhe; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index fc0df09df8..103c132f03 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -54,6 +54,7 @@ #include "zebra/zebra_vxlan_private.h" #include "zebra/zebra_pbr.h" #include "zebra/zebra_nhg.h" +#include "zebra/zebra_evpn_mh.h" #include "zebra/interface.h" #include "northbound_cli.h" #include "zebra/zebra_nb.h" @@ -2355,6 +2356,33 @@ DEFUN (show_vrf, return CMD_SUCCESS; } +DEFPY (evpn_mh_mac_holdtime, + evpn_mh_mac_holdtime_cmd, + "[no$no] evpn mh mac-holdtime (0-86400)$duration", + NO_STR + "EVPN\n" + "Multihoming\n" + "MAC hold time\n" + "Duration in seconds\n") +{ + return zebra_evpn_mh_mac_holdtime_update(vty, duration, + no ? true : false); +} + +DEFPY (evpn_mh_neigh_holdtime, + evpn_mh_neigh_holdtime_cmd, + "[no$no] evpn mh neigh-holdtime (0-86400)$duration", + NO_STR + "EVPN\n" + "Multihoming\n" + "Neighbor entry hold time\n" + "Duration in seconds\n") +{ + + return zebra_evpn_mh_neigh_holdtime_update(vty, duration, + no ? true : false); +} + DEFUN (default_vrf_vni_mapping, default_vrf_vni_mapping_cmd, "vni " CMD_VNI_RANGE "[prefix-routes-only]", @@ -3403,6 +3431,8 @@ static int config_write_protocol(struct vty *vty) /* Include dataplane info */ dplane_config_write_helper(vty); + zebra_evpn_mh_config_write(vty); + /* Include nexthop-group config */ if (!zebra_nhg_kernel_nexthops_enabled()) vty_out(vty, "no zebra nexthop kernel enable\n"); @@ -3899,6 +3929,8 @@ void zebra_vty_init(void) install_element(VIEW_NODE, &show_pbr_ipset_cmd); install_element(VIEW_NODE, &show_pbr_iptable_cmd); + install_element(CONFIG_NODE, &evpn_mh_mac_holdtime_cmd); + install_element(CONFIG_NODE, &evpn_mh_neigh_holdtime_cmd); install_element(CONFIG_NODE, &default_vrf_vni_mapping_cmd); install_element(CONFIG_NODE, &no_default_vrf_vni_mapping_cmd); install_element(VRF_NODE, &vrf_vni_mapping_cmd); |
