]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Convert over to using converged to test for ospf being converged 9822/head
authorDonald Sharp <sharpd@nvidia.com>
Wed, 13 Oct 2021 16:46:22 +0000 (12:46 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 13 Oct 2021 16:46:22 +0000 (12:46 -0400)
OSPF when it is deciding on whom it should elect for DR and backup
has a process that prioritizes network stabilty over the exact
same results of who is the DR / Backups.

Essentially if we have r1 ----- r2

Let's say r1 has a higher priority, but r2 comes up first, starts
sending hello packets and then decides that it is the DR.  At some
point in time in the future, r1 comes up and then connects to r2
at that point it sees that r2 has elected itself DR and it keeps
it that way.

This is by design of the system.  With our tight ospf timers as
well as high load being experienced on our test systems.  There
exists a bunch of ospf tests that we cannot guarantee that a
consistent DR will be elected for the test.  As such let's not
even pretend that we care a bunch and just look for `Full`.
If we care about `ordering` we need to spend more time getting
the tests to actually start routers, ensure that htey are up and
running in the right order so that priority can take place.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
28 files changed:
tests/topotests/bgp_features/r1/ospf_neighbor.json
tests/topotests/bgp_features/r2/ospf_neighbor.json
tests/topotests/bgp_features/r3/ospf_neighbor.json
tests/topotests/ldp_oc_acl_topo1/r1/show_ip_ospf_neighbor.json
tests/topotests/ldp_oc_acl_topo1/r2/show_ip_ospf_neighbor.json
tests/topotests/ldp_oc_acl_topo1/r3/show_ip_ospf_neighbor.json
tests/topotests/ldp_oc_acl_topo1/r4/show_ip_ospf_neighbor.json
tests/topotests/ldp_oc_topo1/r1/show_ip_ospf_neighbor.json
tests/topotests/ldp_oc_topo1/r2/show_ip_ospf_neighbor.json
tests/topotests/ldp_oc_topo1/r3/show_ip_ospf_neighbor.json
tests/topotests/ldp_oc_topo1/r4/show_ip_ospf_neighbor.json
tests/topotests/ldp_sync_ospf_topo1/r1/show_ip_ospf_neighbor.json
tests/topotests/ldp_sync_ospf_topo1/r2/show_ip_ospf_neighbor.json
tests/topotests/ldp_sync_ospf_topo1/r3/show_ip_ospf_neighbor.json
tests/topotests/ldp_vpls_topo1/r1/show_ip_ospf_neighbor.json
tests/topotests/ldp_vpls_topo1/r2/show_ip_ospf_neighbor.json
tests/topotests/ldp_vpls_topo1/r3/show_ip_ospf_neighbor.json
tests/topotests/ospf_gr_topo1/rt1/show_ip_ospf_neighbor.json
tests/topotests/ospf_gr_topo1/rt2/show_ip_ospf_neighbor.json
tests/topotests/ospf_gr_topo1/rt3/show_ip_ospf_neighbor.json
tests/topotests/ospf_gr_topo1/rt4/show_ip_ospf_neighbor.json
tests/topotests/ospf_gr_topo1/rt5/show_ip_ospf_neighbor.json
tests/topotests/ospf_gr_topo1/rt6/show_ip_ospf_neighbor.json
tests/topotests/ospf_gr_topo1/rt7/show_ip_ospf_neighbor.json
tests/topotests/ospf_topo1/test_ospf_topo1.py
tests/topotests/pim_acl/r1/ospf_neighbor.json
tests/topotests/pim_igmp_vrf/r1/ospf_blue_neighbor.json
tests/topotests/pim_igmp_vrf/r1/ospf_red_neighbor.json

index e742c119dadd23d42038874e5a204cf557ae6300..3b5f46d9346b014f1d49ab62418c50995d2366d3 100644 (file)
@@ -3,13 +3,13 @@
     "192.168.0.2":[
       {
         "priority":5,
-        "state":"Full\/Backup"
+        "converged":"Full"
       }
     ],
     "192.168.0.3":[
       {
         "priority":5,
-        "state":"Full\/Backup"
+        "converged":"Full"
       }
     ]
   }
index 2fd589ae25d63d2f6de2dc60554e05cfa51530ea..47bb57cd00f75e7157382beda1858e52abd572b9 100644 (file)
@@ -3,13 +3,13 @@
     "192.168.0.1":[
       {
         "priority":10,
-        "state":"Full\/DR"
+        "converged":"Full"
       }
     ],
     "192.168.0.3":[
       {
         "priority":5,
-        "state":"Full\/Backup"
+        "converged":"Full"
       }
     ]
   }
index 80fc92c3bcd3f526a2f1c530e902098b6bfcf753..b84974ccca64a1eb919eb6a1eedb7a1a962755b7 100644 (file)
@@ -3,13 +3,13 @@
     "192.168.0.1":[
       {
         "priority":10,
-        "state":"Full\/DR"
+        "converged":"Full"
       }
     ],
     "192.168.0.2":[
       {
         "priority":10,
-        "state":"Full\/DR"
+        "converged":"Full"
       }
     ]
   }
index aa3f74fc5f12e96cee05f51aa12d192127c6bb6c..63281e9be33d0b27f5a216ca993bae6b515ffd45 100644 (file)
@@ -3,7 +3,7 @@
     "2.2.2.2":[
       {
         "priority":2,
-        "state":"Full\/DR",
+        "converged":"Full",
         "address":"10.0.1.2",
         "ifaceName":"r1-eth0:10.0.1.1"
       }
index aa68198957b610ec89acfcd1ec9df63c5b3d692a..f361d605ce30478c42ff0e6524ad1da8d1bcb3c8 100644 (file)
@@ -3,7 +3,7 @@
     "1.1.1.1":[
       {
         "priority":1,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.1.1",
         "ifaceName":"r2-eth0:10.0.1.2"
       }
@@ -11,7 +11,7 @@
     "3.3.3.3":[
       {
         "priority":2,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.2.3",
         "ifaceName":"r2-eth1:10.0.2.2"
       }
@@ -19,7 +19,7 @@
     "4.4.4.4":[
       {
         "priority":3,
-        "state":"Full\/DR",
+        "converged":"Full",
         "address":"10.0.2.4",
         "ifaceName":"r2-eth1:10.0.2.2"
       }
index 905774fc466ad5ae6637077561a54a379f99a422..38794357ff5b24472bc0705cf655e03bbea14fb2 100644 (file)
@@ -3,7 +3,7 @@
     "2.2.2.2":[
       {
         "priority":1,
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.2.2",
         "ifaceName":"r3-eth0:10.0.2.3"
       }
@@ -11,7 +11,7 @@
     "4.4.4.4":[
       {
         "priority":3,
-        "state":"Full\/DR",
+        "converged":"Full",
         "address":"10.0.2.4",
         "ifaceName":"r3-eth0:10.0.2.3"
       }
index 67593952cae13d737e0c3944f4b185029501f223..fccca693b92b03ee64e7b37f8e85d153f274fc14 100644 (file)
@@ -4,7 +4,7 @@
     "2.2.2.2":[
       {
         "priority":1,
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.2.2",
         "ifaceName":"r4-eth0:10.0.2.4"
       }
@@ -12,7 +12,7 @@
     "3.3.3.3":[
       {
         "priority":2,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.2.3",
         "ifaceName":"r4-eth0:10.0.2.4"
       }
index aa3f74fc5f12e96cee05f51aa12d192127c6bb6c..63281e9be33d0b27f5a216ca993bae6b515ffd45 100644 (file)
@@ -3,7 +3,7 @@
     "2.2.2.2":[
       {
         "priority":2,
-        "state":"Full\/DR",
+        "converged":"Full",
         "address":"10.0.1.2",
         "ifaceName":"r1-eth0:10.0.1.1"
       }
index aa68198957b610ec89acfcd1ec9df63c5b3d692a..f361d605ce30478c42ff0e6524ad1da8d1bcb3c8 100644 (file)
@@ -3,7 +3,7 @@
     "1.1.1.1":[
       {
         "priority":1,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.1.1",
         "ifaceName":"r2-eth0:10.0.1.2"
       }
@@ -11,7 +11,7 @@
     "3.3.3.3":[
       {
         "priority":2,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.2.3",
         "ifaceName":"r2-eth1:10.0.2.2"
       }
@@ -19,7 +19,7 @@
     "4.4.4.4":[
       {
         "priority":3,
-        "state":"Full\/DR",
+        "converged":"Full",
         "address":"10.0.2.4",
         "ifaceName":"r2-eth1:10.0.2.2"
       }
index 905774fc466ad5ae6637077561a54a379f99a422..38794357ff5b24472bc0705cf655e03bbea14fb2 100644 (file)
@@ -3,7 +3,7 @@
     "2.2.2.2":[
       {
         "priority":1,
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.2.2",
         "ifaceName":"r3-eth0:10.0.2.3"
       }
@@ -11,7 +11,7 @@
     "4.4.4.4":[
       {
         "priority":3,
-        "state":"Full\/DR",
+        "converged":"Full",
         "address":"10.0.2.4",
         "ifaceName":"r3-eth0:10.0.2.3"
       }
index 67593952cae13d737e0c3944f4b185029501f223..fccca693b92b03ee64e7b37f8e85d153f274fc14 100644 (file)
@@ -4,7 +4,7 @@
     "2.2.2.2":[
       {
         "priority":1,
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.2.2",
         "ifaceName":"r4-eth0:10.0.2.4"
       }
@@ -12,7 +12,7 @@
     "3.3.3.3":[
       {
         "priority":2,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.2.3",
         "ifaceName":"r4-eth0:10.0.2.4"
       }
index 3bfda390714c832424962056811cb59e80548b43..7efde22f3f3d6e636efb67e28af125b13f3baf41 100644 (file)
@@ -5,7 +5,7 @@
         "dbSummaryCounter": 0,
         "retransmitCounter": 0,
         "priority": 1,
-        "state": "Full/DROther",
+        "converged": "Full",
         "address": "10.0.1.2",
         "ifaceName": "r1-eth1:10.0.1.1",
         "requestCounter": 0
@@ -16,7 +16,7 @@
         "dbSummaryCounter": 0,
         "retransmitCounter": 0,
         "priority": 1,
-        "state": "Full/DROther",
+        "converged": "Full",
         "address": "10.0.2.3",
         "ifaceName": "r1-eth2:10.0.2.1",
         "requestCounter": 0
index 5b7a5ebbb99870c5663477ad5a0794d1d1e0073b..5bea193e01a276f69d84dfc0e6c0d96ea6acd09d 100644 (file)
@@ -3,7 +3,7 @@
     "1.1.1.1": [
       {
         "priority":1,
-        "state":"Full/DROther",
+        "converged":"Full",
         "address":"10.0.1.1",
         "ifaceName":"r2-eth1:10.0.1.2",
         "retransmitCounter":0,
@@ -14,7 +14,7 @@
     "3.3.3.3": [
       {
         "priority":1,
-        "state":"Full/DROther",
+        "converged":"Full",
         "address":"10.0.3.3",
         "ifaceName":"r2-eth2:10.0.3.2",
         "retransmitCounter":0,
index 1b29b9f94788ccc14a56f8acccb9ea10b3c26771..9966297d8a7135a2402e15e62b549f9c32630f6a 100644 (file)
@@ -3,7 +3,7 @@
     "1.1.1.1": [
       {
         "priority":1,
-        "state":"Full/DROther",
+        "converged":"Full",
         "address":"10.0.2.1",
         "ifaceName":"r3-eth1:10.0.2.3",
         "retransmitCounter":0,
@@ -14,7 +14,7 @@
     "2.2.2.2": [
       {
         "priority":1,
-        "state":"Full/DROther",
+        "converged":"Full",
         "address":"10.0.3.2",
         "ifaceName":"r3-eth2:10.0.3.3",
         "retransmitCounter":0,
index 7e281abb5fd43128ea29e8879a7a84010669479f..90c8195416f16d85ec6ac260b364566322a3b4c6 100644 (file)
@@ -5,7 +5,7 @@
         "dbSummaryCounter": 0,
         "retransmitCounter": 0,
         "priority": 2,
-        "state": "Full\/DR",
+        "converged": "Full",
         "address": "10.0.1.2",
         "ifaceName": "r1-eth1:10.0.1.1",
         "requestCounter": 0
@@ -16,7 +16,7 @@
         "dbSummaryCounter": 0,
         "retransmitCounter": 0,
         "priority": 2,
-        "state": "Full\/DR",
+        "converged": "Full",
         "address": "10.0.2.3",
         "ifaceName": "r1-eth2:10.0.2.1",
         "requestCounter": 0
index 22fd98f519c38d703ffe05f91de859a8eec88aaf..29dde53c6d7a3f99339df1e34eae9fee29124bce 100644 (file)
@@ -3,7 +3,7 @@
     "1.1.1.1": [
       {
         "priority":1,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.1.1",
         "ifaceName":"r2-eth1:10.0.1.2",
         "retransmitCounter":0,
@@ -14,7 +14,7 @@
     "3.3.3.3": [
       {
         "priority":2,
-        "state":"Full\/DR",
+        "converged":"Full",
         "address":"10.0.3.3",
         "ifaceName":"r2-eth2:10.0.3.2",
         "retransmitCounter":0,
index 970eb2fc1d72f7a640bcef535e595564ce711d19..9966297d8a7135a2402e15e62b549f9c32630f6a 100644 (file)
@@ -3,7 +3,7 @@
     "1.1.1.1": [
       {
         "priority":1,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.2.1",
         "ifaceName":"r3-eth1:10.0.2.3",
         "retransmitCounter":0,
@@ -14,7 +14,7 @@
     "2.2.2.2": [
       {
         "priority":1,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"10.0.3.2",
         "ifaceName":"r3-eth2:10.0.3.3",
         "retransmitCounter":0,
index ed290323a4219d969b3e9218bd8d3117b379902d..f82758101c0b480dde1eb749ecd0cb73ecaf31ca 100644 (file)
@@ -2,7 +2,7 @@
   "neighbors":{
     "2.2.2.2":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.1.2",
         "ifaceName":"eth-rt2:10.0.1.1"
       }
index 4fe92b0b98ccccc8e8642e9705f885758bb2f6cd..5a0b0927020483ab95cd8ba1dbb0410d7a34234e 100644 (file)
@@ -2,14 +2,14 @@
   "neighbors":{
     "1.1.1.1":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.1.1",
         "ifaceName":"eth-rt1:10.0.1.2"
       }
     ],
     "3.3.3.3":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.2.3",
         "ifaceName":"eth-rt3:10.0.2.2"
       }
index e3c36ab9a35f36e74cd5600ee7666cbeef164d38..ab5e78414d1c1dcd5465c731388e405872a97712 100644 (file)
@@ -2,21 +2,21 @@
   "neighbors":{
     "2.2.2.2":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.2.2",
         "ifaceName":"eth-rt2:10.0.2.3"
       }
     ],
     "4.4.4.4":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.3.4",
         "ifaceName":"eth-rt4:10.0.3.3"
       }
     ],
     "6.6.6.6":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.4.6",
         "ifaceName":"eth-rt6:10.0.4.3"
       }
index 2123ecb8da896dce91e240f416beed29e62839b2..405679c10e986cc971ab668285c9212f6726fea7 100644 (file)
@@ -2,14 +2,14 @@
   "neighbors":{
     "3.3.3.3":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.3.3",
         "ifaceName":"eth-rt3:10.0.3.4"
       }
     ],
     "5.5.5.5":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.5.5",
         "ifaceName":"eth-rt5:10.0.5.4"
       }
index 6440b6769875b557a69f92abae15b7efa20961cd..893d454368539b4e72c71f5b934e52dd9f4431a3 100644 (file)
@@ -2,7 +2,7 @@
   "neighbors":{
     "4.4.4.4":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.5.4",
         "ifaceName":"eth-rt4:10.0.5.5"
       }
index d815c239279943b479cd02c91de16f4e92e6c926..564a513ac6e94ce06cb294b700c9a772f310be22 100644 (file)
@@ -2,14 +2,14 @@
   "neighbors":{
     "3.3.3.3":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.4.3",
         "ifaceName":"eth-rt3:10.0.4.6"
       }
     ],
     "7.7.7.7":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.6.7",
         "ifaceName":"eth-rt7:10.0.6.6"
       }
index 2254aea9a68d17351639debb9e6980caba8cd4fb..bc6b60697c703e58dd393cdae5a710e509c16306 100644 (file)
@@ -2,7 +2,7 @@
   "neighbors":{
     "6.6.6.6":[
       {
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"10.0.6.6",
         "ifaceName":"eth-rt6:10.0.6.7"
       }
index d84c41bea32ae4a2c68a8ca60137f714f87fb109..710895cc6bab325fd7b7c2256ceb583bfaaf93af 100644 (file)
@@ -135,7 +135,7 @@ def test_wait_protocol_convergence():
             )
             if (
                 topotest.json_cmp(
-                    result, {"neighbors": {neighbor: [{"state": "Full/DR"}]}}
+                    result, {"neighbors": {neighbor: [{"converged": "Full"}]}}
                 )
                 is None
             ):
@@ -143,14 +143,14 @@ def test_wait_protocol_convergence():
 
             if (
                 topotest.json_cmp(
-                    result, {"neighbors": {neighbor: [{"state": "Full/DROther"}]}}
+                    result, {"neighbors": {neighbor: [{"converged": "Full"}]}}
                 )
                 is None
             ):
                 return None
 
             return topotest.json_cmp(
-                result, {"neighbors": {neighbor: [{"state": "Full/Backup"}]}}
+                result, {"neighbors": {neighbor: [{"converged": "Full"}]}}
             )
 
         _, result = topotest.run_and_expect(
index a8fc093e90dd19241cd0231a63a1423524bcf3b5..af83d6bea373a0029b8917596785650a6b4624ee 100644 (file)
@@ -3,7 +3,7 @@
     "192.168.0.11":[
       {
         "priority":10,
-        "state":"Full\/Backup",
+        "converged":"Full",
         "address":"192.168.101.11",
         "ifaceName":"r1-eth1:192.168.101.1",
         "retransmitCounter":0,
@@ -14,7 +14,7 @@
     "192.168.0.12":[
       {
         "priority":0,
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"192.168.101.12",
         "ifaceName":"r1-eth1:192.168.101.1",
         "retransmitCounter":0,
@@ -25,7 +25,7 @@
     "192.168.0.13":[
       {
         "priority":0,
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"192.168.101.13",
         "ifaceName":"r1-eth1:192.168.101.1",
         "retransmitCounter":0,
@@ -36,7 +36,7 @@
     "192.168.0.14":[
       {
         "priority":0,
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"192.168.101.14",
         "ifaceName":"r1-eth1:192.168.101.1",
         "retransmitCounter":0,
@@ -47,7 +47,7 @@
     "192.168.0.15":[
       {
         "priority":0,
-        "state":"Full\/DROther",
+        "converged":"Full",
         "address":"192.168.101.15",
         "ifaceName":"r1-eth1:192.168.101.1",
         "retransmitCounter":0,
index 604d25fac14106899eeb964f94c24f5d57c4deb6..1e70fcc36e375ce8189a610bc0f3c07f1661b867 100644 (file)
@@ -5,7 +5,7 @@
       "192.168.0.11":[
         {
           "priority":10,
-          "state":"Full\/Backup",
+          "converged":"Full",
           "address":"192.168.101.11",
           "ifaceName":"r1-eth1:192.168.101.1"
         }
index 456bb87520568cefdf4bd8ef2ac8f01878f55c59..7f2ab248cc1d00c2941910ec4146b182837320f1 100644 (file)
@@ -5,7 +5,7 @@
       "192.168.0.12":[
         {
           "priority":10,
-          "state":"Full\/Backup",
+          "converged":"Full",
           "address":"192.168.101.12",
           "ifaceName":"r1-eth3:192.168.101.1"
         }