Commit Graph

2735 Commits

Author SHA1 Message Date
Stephen Worley
cc07a819e4 tests: fix SVD topotest, new evpn vni json output
The output of `show evpn vni [VNI] json` changed,
so updated the test with the new keys/output.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13 18:12:05 -05:00
Stephen Worley
6246b57e7c tests: add topotest to cover SVD flood entry
Add a topotest to cover making sure SVD flood entries
are installed with SVD.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13 18:12:05 -05:00
Stephen Worley
6712f624da tests: fix mpls_label2str() in make check
Fix ospfd unit tests in make check that had not been
updated to the new lib function.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13 18:12:05 -05:00
Stephen Worley
568d4324f2 tests: skip SVD/DVNI tests for < 5.7 kernel
Skip the SVD/DVNI topotests if the kernel version is
not at least 5.7.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13 18:12:05 -05:00
Stephen Worley
ef94412971 tests: add first dvni topotests
Add first of dvni topotests. Covers just basic usage of importing
wildcard VNI and installing it via lwt encap.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13 18:12:05 -05:00
Sharath Ramamurthy
1ca713b375 tests: add new topotest for single vxlan device config
Add new topo tests for validating mac learning, bridging and routing
with single vxlan device configuration

Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-13 18:12:04 -05:00
Donald Sharp
787b4fe469
Merge pull request #12782 from opensourcerouting/fix/bgpd_aspath_str_crash
bgpd: Intern default-originate attributes to avoid use-after-free
2023-02-09 19:25:19 -05:00
Donatas Abraitis
35b7ce08a8 tests: Check if BGP default-originate withdraw works correctly
And also do not crash when we do `clear ip bgp ...`.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-09 22:57:42 +02:00
Louis Scalbert
a8d6faa986 tests: do not use exclude grep
Filter out keys in JSON output with "grep -v" does not work when JSON
does not use the pretty format.

Use native python code to filter out keys.

Fixes: 6c13bd5744 ("topotests: fix bgp_vpnv4_noretain")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-08 12:05:15 +01:00
Donatas Abraitis
197c3a768c
Merge pull request #12654 from Pdoijode/evpn-evi-detail-json-changes
zebra: fix JSON fields for show evpn vni detail
2023-02-07 23:31:53 +02:00
Donatas Abraitis
1c2ba4a23f tests: Check if route-map vpn import basic funtionality works fine
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-06 18:44:10 +02:00
Donald Sharp
33303f08bf
Merge pull request #12713 from opensourcerouting/fix/json_naming_deprecation
*: Drop deprecated incorrect JSON fields with wrong naming
2023-02-01 15:39:18 -05:00
David Lamparter
ba727609c6 tests: add missing printf attribute
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-01 03:00:22 +01:00
David Lamparter
da63485331 tests: yank asprintfrr duplicate
I think this one predates the existence of asprintfrr.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-01 03:00:22 +01:00
Donatas Abraitis
aa16204dfb
Merge pull request #12667 from donaldsharp/zebra_rib_fixup
tests: zebra_rib remove a sleep
2023-01-31 21:41:30 +02:00
Donatas Abraitis
f932966b02 tests: Use JSON camelCase naming for tests
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-01-31 20:49:44 +02:00
Donald Sharp
be9692741b
Merge pull request #12717 from opensourcerouting/topotest_stop_topo_fix
tests: Fix wrong tgen.stop_topology() calls which got skipped
2023-01-31 12:30:35 -05:00
Mark Stapp
3b337b7d27
Merge pull request #12687 from opensourcerouting/build-mkdir-p
build: consistently mkdir -p output for redirect
2023-01-31 11:28:32 -05:00
Martin Winter
82db2cd11f
tests: Fix wrong tgen.stop_topology() calls which got skipped
Calls were missing the () and caused the stop_topology() to be skipped

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2023-01-31 16:10:04 +01:00
Donald Sharp
99b93e715c tests: zebra_rib remove a sleep
The test was sometimes failing around the sleep(4) for
waiting for the routes to be installed.  Instead of blindly
sleeping let's check to see that the routes are actually
there in zebra and then continue on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-31 09:10:27 -05:00
Donald Sharp
d829de9178
Merge pull request #12710 from opensourcerouting/fix/reset_fqdn_capability_on_before_handling_open
bgpd: Vanish FQDN capability hostname/domainname before handling new BGP OPEN
2023-01-31 08:46:03 -05:00
Martin Winter
6c5045ce4f
tests: Topotests fix for deleting wrong pidfile
Fixes killRouterDaemons() function which occasionally deleted the wrong
pidfile.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2023-01-30 23:29:03 +01:00
Donatas Abraitis
5ca2a7e9e6 tests: Check if we vanish hostname/domainname if disabled from another side
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-01-30 23:22:23 +02:00
Donald Sharp
d844d516da tests: Super simple babel test
Just get babel started and ensure that the v4 routes
are actually installed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-28 11:17:08 -05:00
Pooja Jagadeesh Doijode
1a4a394d45 zebra: fix JSON fields for show evpn vni detail
Few of the JSON field in show evpn vni detail command is
confusing and a few fields were missing. Following is the
updated output.

primary# show evpn vni detail json
[
  {
    "vni":200,
    "type":"L2",
    "vrf":"default",
    "tenantVrf":"default",
    "vxlanInterface":"vni200",
    "ifindex":19,
    "vxlanIfindex":19,
    "sviInterface":"br200",
    "sviIfindex":18,
    "vtepIp":"2.2.2.1",
    "mcastGroup":"0.0.0.0",
    "advertiseGatewayMacip":"No",
    "advertiseSviMacip":"No",
    "numMacs":0,
    "numArpNd":0,
    "numRemoteVteps":1,
    "remoteVteps":[
      {
        "ip":"2.2.2.2",
        "flood":"HER"
      }
    ]
  },
  {
    "vni":100,
    "type":"L3",
    "vrf":"default",
    "tenantVrf":"default",
    "localVtepIp":"2.2.2.1",
    "vxlanIntf":"vni100",
    "sviIntf":"br100",
    "state":"Up",
    "sysMac":"aa:bb:cc:dd:ee:f1",
    "routerMac":"aa:bb:cc:dd:ee:f1",
    "vniFilter":"none",
    "l2Vnis":[
      20,
      30,
      200
    ]
  }
]

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2023-01-27 14:37:00 +00:00
Donatas Abraitis
c30461fc74
Merge pull request #12685 from louis-6wind/fix-vpnv4-noretain
topotests: fix bgp_vpnv4_noretain
2023-01-25 11:23:08 +02:00
Donatas Abraitis
e6158ebe5d
Merge pull request #12660 from Pdoijode/ip-nht-json-changes
zebra: fix JSON fields for "show ip/ipv6 nht"
2023-01-25 10:32:18 +02:00
Pooja Jagadeesh Doijode
553c804846 zebra: fix JSON fields for "show ip/ipv6 nht"
1. Renamed "gates" to "nexthops"
2. Displaying afi of the nexthops being dispalyed in place of
   "nexthops" JSON object in the old JSON output
3. Calling show_route_nexthop_helper() and show_nexthop_json_helper()
   instead of print_nh() inorder to keeps the fields in "nexthops"
   JSON object in sync with "nexthops" JSON object of
   "show nexthop-group rib json".

Updated vtysh:
    r1# show ip nht
    192.168.0.2
     resolved via connected
     is directly connected, r1-eth0 (vrf default)
     Client list: static(fd 28)
    192.168.0.4
     resolved via connected
     is directly connected, r1-eth0 (vrf default)
     Client list: static(fd 28)

Updated JSON:
    r1# show ip nht json
    {
      "default":{
        "ipv4":{
          "192.168.0.2":{
            "nhtConnected":false,
            "clientList":[
              {
                "protocol":"static",
                "socket":28,
                "protocolFiltered":"none"
              }
            ],
            "nexthops":[
              {
                "flags":3,
                "fib":true,
                "directlyConnected":true,
                "interfaceIndex":2,
                "interfaceName":"r1-eth0",
                "vrf":"default",
                "active":true
              }
            ],
            "resolvedProtocol":"connected"
          }
        }
      }
    }

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2023-01-24 18:15:36 -08:00
David Lamparter
d173381edc build: consistently mkdir -p output for redirect
When running the build in a separate build directory, redirecting output
into a file can error out if the directory does not exist yet.  Some
places already had `mkdir -p` calls, but not all.

Make all occurences of this consistently use `@$(MKDIR_P)`.

(Extension of PR #12575 to catch more places.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-24 17:46:57 +01:00
Louis Scalbert
6c13bd5744 topotests: fix bgp_vpnv4_noretain
Fix the following issues:
- two tests are done in one function. Dispatch the tests in two
functions to help the test debug.
- the first test passes even if a third prefix is not filtered. Match
the exact to avoid false positive.
- the expected values contains variable like version. Do no check
variable values.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-01-24 10:20:19 +01:00
Donatas Abraitis
f5c8073ddd
Merge pull request #12669 from proelbtn/fix-accept-own-rd-check
bgpd: Skip RD match if ACCEPT_OWN excended community is not attached
2023-01-20 11:12:47 +02:00
Ryoga Saito
03cc2022d2 tests: Add test to check importing routes to VRF
After implementing ACCEPT_OWN extended community, bgpd can't import VPN
routes to the VRFs whose RD is matched with that of VPN routes. This
commit adds new test to check the effect of the next commit.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2023-01-20 15:28:35 +09:00
Donald Sharp
d7b0c7a577
Merge pull request #12350 from kuldeepkash/pim6_fixes
tests: Fix for multicast_pim6_static_rp tests failure
2023-01-19 13:27:32 -05:00
Christian Hopps
c2c17459ea
Merge pull request #12655 from donaldsharp/pim_basic_cleanups
tests: pim_basic fails in micronet
2023-01-19 11:41:44 -05:00
Donatas Abraitis
cd16c74b77
Merge pull request #12492 from kuldeepkash/update_assert_msg
tests: [topojson] Update assert/error messages
2023-01-19 15:33:19 +02:00
Kuldeep Kashyap
2583746108 tests: fix for test_pim6_multiple_groups_different_RP_address_p2 failure
Testcase: test_pim6_multiple_groups_different_RP_address_p2
was failing because of a bug in framework, Fixed the
bug in this commit.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-01-19 05:26:37 -08:00
Kuldeep Kashyap
2a8ad2ea97 tests: Fix for multicast_pim6_static_rp tests failure
Multicast pim6 static RP tests are failing
when run in parallel using micronet. There
are APIs to clean mcast traffic before
starting new test but these cleanups
are not needed when socat is used.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-01-19 05:26:37 -08:00
Donald Sharp
a6782fbaf8 tests: zebra_netlink only gives 10 seconds to install all routes
Under really heavily loaded systems this is insufficient.  Looking
at the run output we have this:

	  "2.1.3.22\/32":[
	    {
	      "installed":true,
	    }
	  ],
	  "2.1.3.23\/32":[
	    {
	      "queued":true,
            }
           ],

So after 10 seconds on the micronet system only 30 of the 100 routes are installed.
Give it more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-18 15:29:32 -05:00
Donald Sharp
6483e73336 tests: pim_basic fails in micronet
Looks like under heavy load, the test is not giving enough
time to come to steady state.  Do this:

a) send more udp packets and for longer
b) Increase time spent waiting

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-18 15:29:32 -05:00
Christian Hopps
7cec6e4359 tests: replace -a (all) with individual flags for nsenter
- required for old OSs like centos 7
- fixes #11924

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-01-17 11:33:27 -05:00
Russ White
e2fd75fce2
Merge pull request #12584 from pguibert6WIND/bgp_imported_distance
bgpd: imported vpn entries get appropriate distance
2023-01-17 10:16:46 -05:00
Russ White
00d7261e20
Merge pull request #12636 from opensourcerouting/fix/bgp_accept-own_connected_routes
bgpd: Allow importing local routes with accept-own mechanism
2023-01-17 09:31:37 -05:00
Russ White
2a71812153
Merge pull request #12601 from opensourcerouting/feature/bgp_neighbor_path-attribute_discard
bgpd: Add `neighbor path-attribute discard` command
2023-01-17 09:12:17 -05:00
Russ White
3b506eccc1
Merge pull request #12597 from opensourcerouting/fix/bgp_sender_as_path_prevention
bgpd: Do not send routes back received from a peer
2023-01-17 09:11:53 -05:00
Russ White
13e9afe9e4
Merge pull request #12424 from opensourcerouting/static-route-bfd
staticd: BFD static route monitoring
2023-01-17 09:09:24 -05:00
Philippe Guibert
a04f1c42eb bgpd: imported vpn entries get appropriate distance
MPLS VPN networks can either peer with iBGP or eBGP. When
calculating the distance to send to zebra, the imported prefix
is never sent with distance information, even if the vty
command is used under the ipv4 unicast address family:

router bgp 65505 vrf vrf1
 address-family ipv4 unicast
  distance bgp 26 27 28
  [vpn config]

The observation is that the distance sent to zebra for an
imported prefix is still 20:

[..]
VRF vrf1:
B>  192.168.0.0/24 [20/0] via 2.2.2.2 (vrf default) (recursive), label 20, weight 1, 00:00:12
  *                          via 10.125.0.6, ntfp3 (vrf default), label implicit-null/20, weight 1, 00:00:12

The expectation is that the incoming prefix has to follow the
distance that is configured, or the distance derived from the peer
relationship established by the parent prefix.

In the case, an iBGP relationship is done, and no distance
configuration is done, the below show is expected:

   [..]
   VRF vrf1:
   B*>  192.168.0.0/24 [200/0] via 192.168.0.2, r1-gre0 (vrf default), label 20, weight 1, 00:00:12

In the case an iBGP relationship is done, and distance configuration
is performed as below:
   [..]
   distance bgp 21 201 41
   [..]

Then the below show is expected:

   [..]
   VRF vrf1:
   B*>  192.168.0.0/24 [201/0] via 192.168.0.2, r1-gre0 (vrf default), label 20, weight 1, 00:00:12

To get this behaviour, get the peer origin where the prefix is coming
from.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-01-17 13:24:33 +01:00
Kuldeep Kashyap
244f2df015 tests: Fix for frr-bot style issues
Fixed style issues repoted by frr-bot

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-01-17 14:07:23 +05:30
Kuldeep Kashyap
db726bb8b7 tests: [topojson]Update assert/error messages
Few assert/error messages are updated for test
scripts for better debugging.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-01-17 14:00:49 +05:30
Donatas Abraitis
b4710d034d tests: Check if connected routes are leaked between VRFs using accept-own
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-01-15 12:22:12 +02:00
Donald Sharp
483b322821 tests: route_scale tests are failing on micronet
I'm seeing test failures after in micronet runs in CI
after 7 seconds * 30 attempts at seeing if it succeeds.
Let's see if another 60 seconds of attempts allows
this to work properly.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-15 10:13:04 +00:00