]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #13312 from chiragshah6/fdev2
authorDonatas Abraitis <donatas@opensourcerouting.org>
Sun, 16 Apr 2023 08:27:53 +0000 (11:27 +0300)
committerGitHub <noreply@github.com>
Sun, 16 Apr 2023 08:27:53 +0000 (11:27 +0300)
zebra: EVPN MH ES-peer Sync MAC installed as inactive

tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-3.py
tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-4.py
tests/topotests/bgp_unique_rid/test_bgp_unique_rid.py
tools/frr-reload.py

index 6388295c951f3c963644b3008aae42a4ee020558..f8a01a1c9d8e35d91cd59af281e2a3bc509a0129 100644 (file)
@@ -2142,6 +2142,9 @@ def test_BGP_GR_TC_43_p1(request):
             tc_name, result
         )
 
+    # restart the daemon or we get warnings in the follow-on tests
+    start_router_daemons(tgen, "r1", ["bgpd"])
+
     write_test_footer(tc_name)
 
 
@@ -2432,6 +2435,9 @@ def test_BGP_GR_TC_44_p1(request):
         result = verify_rib(tgen, addr_type, dut, input_topo, next_hop, protocol)
         assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
 
+    # restart the daemon or we get warnings in the follow-on tests
+    start_router_daemons(tgen, "r2", ["bgpd"])
+
     write_test_footer(tc_name)
 
 
@@ -2727,6 +2733,9 @@ def test_BGP_GR_TC_45_p1(request):
         result = verify_rib(tgen, addr_type, dut, input_topo, next_hop, protocol)
         assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
 
+    # restart the daemon or we get warnings in the follow-on tests
+    start_router_daemons(tgen, "r1", ["bgpd"])
+
     write_test_footer(tc_name)
 
 
index 1166cdc0efb8018d4e2b38081dfe4bc12d6e3fdf..31aaa0b8a6dfd2fd245d6422f609f65eafd96f91 100644 (file)
@@ -763,6 +763,9 @@ def test_BGP_GR_TC_46_p1(request):
             tc_name, result
         )
 
+    # restart the daemon or we get warnings in the follow-on tests
+    start_router_daemons(tgen, "r1", ["bgpd"])
+
     write_test_footer(tc_name)
 
 
@@ -1023,6 +1026,9 @@ def test_BGP_GR_TC_47_p1(request):
             tc_name, result
         )
 
+    # restart the daemon or we get warnings in the follow-on tests
+    start_router_daemons(tgen, "r1", ["bgpd"])
+
     write_test_footer(tc_name)
 
 
@@ -1300,6 +1306,9 @@ def test_BGP_GR_TC_48_p1(request):
             tc_name, result
         )
 
+    # restart the daemon or we get warnings in the follow-on tests
+    start_router_daemons(tgen, "r1", ["bgpd"])
+
     write_test_footer(tc_name)
 
 
index 47b2452b81bdce2d1fe38202ec0a42ced7b0ad47..f89f3378fbf7aca0420d60d125ac5faa0012cbdd 100644 (file)
@@ -847,8 +847,6 @@ def test_bgp_unique_rid_chaos4_p2():
         for intf in topo["routers"][rtr]["links"].keys():
             topo1["routers"][rtr]["links"][intf].pop("ipv4")
             topo1["routers"][rtr]["links"][intf].pop("ipv6")
-            if intf is "lo":
-                topo1["routers"][rtr]["links"][intf].pop("ipv4")
 
     build_config_from_json(tgen, topo1, save_bkup=False)
 
index 490e519ae9d7e47e5b655551a1ceec2479dc1ccd..0e0aec98392d68315b94ab3297b0eb3909fbfab3 100755 (executable)
@@ -788,6 +788,8 @@ def bgp_delete_nbr_remote_as_line(lines_to_add):
     # remote-as config.
 
     pg_dict = dict()
+    found_pg_cmd = False
+
     # Find all peer-group commands; create dict of each peer-group
     # to store assoicated neighbor as value
     for ctx_keys, line in lines_to_add:
@@ -809,6 +811,10 @@ def bgp_delete_nbr_remote_as_line(lines_to_add):
                 }
                 found_pg_cmd = True
 
+    # Do nothing if there is no any "peer-group"
+    if found_pg_cmd is False:
+        return
+
     # Find peer-group with remote-as command, also search neighbor
     # associated to peer-group and store into peer-group dict
     for ctx_keys, line in lines_to_add:
@@ -850,7 +856,7 @@ def bgp_delete_nbr_remote_as_line(lines_to_add):
                 for pg in pg_dict[ctx_keys[0]]:
                     if pg_dict[ctx_keys[0]][pg]["remoteas"] == True:
                         for nbr in pg_dict[ctx_keys[0]][pg]["nbr"]:
-                            if re_nbr_rmtas.group(1) in nbr:
+                            if re_nbr_rmtas.group(1) == nbr:
                                 lines_to_del_from_add.append((ctx_keys, line))
 
     for ctx_keys, line in lines_to_del_from_add: