Commit Graph

3080 Commits

Author SHA1 Message Date
Donald Sharp
f5c44adb73 tests: isis_tilfa_topo1 fails sometimes due to insufficient time
The isis_tilfa_topo1 test is failing because insufficient time was
given for isis to converge on the system under system load.  Extend
the time and decrease the hello-interval timers to give it more
of a chance to converge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
ce51339205 tests: bgp_vpnv4_per_nexthop_label is failing
The test is failing because it assumes a json key
is always present when it is not.  Test for it
before having the test fail.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
481c540d28 tests: zebra_rib route-map run times fixup
I have a local test run where the sharp route-map usage
was being checked for 5 seconds.  I saw usages going up
for each 1 second check and the 5th one was at 497 out
of 500.  Looks like the system was really loaded.  Let's
give it more time to coalesce under heavy load.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
9b38d8fec9 tests: Do not remove core files
Tests are removing core files and we are missing some
of them because of this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
a8510639ad tests: If a core file is generated fail the test
If a .dmp file is found in the test log directories
fail the test.

Issue: #13788
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
caa278d0c7 tests: Look for zlog_backtrace in ci system
There are parts of our daemons that upon certain types
of errors that a zlog_backtrace is auto-generated.
It is desirable for this to be caught and have the
test auto-failed.

Issue: #13787
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donatas Abraitis
bea517b669 tests: Ignore test_darr for git
This file is generated after `make check`.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-08 22:41:34 +03:00
Donald Sharp
3b496e9b5d
Merge pull request #13915 from pguibert6WIND/bgp_vpnv6_per_nexthop_better_test
topotests: label per nexthop ipv6 test adds add a while loop for mpls…
2023-07-06 16:21:19 -04:00
Donatas Abraitis
2ec7477a26
Merge pull request #13808 from anlancs/fix/zebra-kernel-route-reserved
zebra: fix wrong nexthop check for kernel routes
2023-07-06 09:01:21 +03:00
Philippe Guibert
48f73cbd2f topotests: label per nexthop ipv6 test adds add a while loop for mpls table
The bgp_vpnv6_per_nexthop_label tests only check to see if the mpls labels
are installed one time. Test runs show that all but one label is installed.
More than likely the test has asked for data while zebra is still installing
it. the mpls_label_check functions must check this result multiple times as
that system may be under heavy load.

A loop is introduced in order to let zebra check the mpls table.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-07-05 21:58:38 +02:00
Donald Sharp
806b0ca085
Merge pull request #13916 from pguibert6WIND/vpnv4_asbr_test_complement
topotests: bgp_vpnv4_asbr, wait that mpls entry is installed
2023-07-03 08:34:01 -04:00
Philippe Guibert
37b602a69d topotests: bgp_vpnv4_asbr, wait that mpls entry is installed
Ensure in the test that MPLS entries are installed before
declaring the test fails.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-07-03 10:27:23 +02:00
anlan_cs
019ac03e5b tests: Check if kernel routes work with changed vrf
Check `show ip route` for specific kernel routes after
the interface as their nexthop changes vrf.

After moving interface's vrf, there should be no kernel
route in old vrf.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-07-02 10:30:09 +08:00
Donatas Abraitis
3b02d99f33
Merge pull request #13836 from pguibert6WIND/set_aspath_replace_with_configured_asn
bgpd: add 'set as-path replace' with a configured ASN
2023-06-30 12:39:55 +03:00
Jafar Al-Gharaibeh
6f0aef2ef8
Merge pull request #13866 from LabNConsulting/mgmtd/incllang
Changes for inclusive language and other cleanup
2023-06-29 17:14:21 -05:00
Donald Sharp
c65e7e7c3f tests: Fix broken check_ping run_and_expect semantics
*again*.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-29 10:42:11 -04:00
Philippe Guibert
a3f0a1f5ed bgpd: add 'set as-path replace' with a configured ASN
There is no route-map set action to replace any ASN,
or a part of an ASN, with a configured ASN.

The current commit adds a new command to use a configured
ASN as replacement, instead of using the local as number.

> set as-path replace any 65500

Update the 'bgp_set_aspath_replace' test.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-28 21:21:55 +02:00
Christian Hopps
e6e0c5bd25 lib: add dynamic array type
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-27 18:00:56 -04:00
Russ White
4a7d9469f2
Merge pull request #13826 from opensourcerouting/fix/ripng_match_ipv6_acls
ripng: match ipv6 address [prefix-list] CMDs
2023-06-27 11:31:23 -04:00
Donatas Abraitis
53785cdd43
Merge pull request #13628 from kuldeepkash/uplink_mcast_tests
tests: Add multicast-pim-multi-uplink test suite
2023-06-27 13:34:17 +03:00
Donatas Abraitis
4199f032e5
Merge pull request #13722 from fdumontet6WIND/color_extcomm
bgpd,lib,yang: add colored extended communities support
2023-06-27 13:03:22 +03:00
Francois Dumontet
9ec092c6a2 tests: add bgp colored extended community test
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2023-06-26 14:27:27 +02:00
Kuldeep Kashyap
e3122819e9 tests: Add multicast-pim-multi-uplink-topo3 suite
Added 4 new test cases to verify multicast PIM
uplink(8 uplink) functionality.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-06-26 09:30:04 +05:30
Kuldeep Kashyap
e350fb986e tests: Add multicast-pim-multi-uplink-topo2 suite
Added 4 new test cases to verify multicast PIM
uplink(8 uplink) functionality.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-06-26 09:30:04 +05:30
Jafar Al-Gharaibeh
499eae6c6b
Merge pull request #13795 from LabNConsulting/chopps/mgmt-lock-cleanup
mgmt lock simplification
2023-06-22 13:31:27 -05:00
Donatas Abraitis
2d4da959a6 tests: Check if match ipv6 address [prefix-list] CMDs work for ripng
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-22 00:14:03 +03:00
Russ White
be4cfbd2b8
Merge pull request #13790 from pguibert6WIND/set_aspath_exclude
bgpd: add 'set as-path exclude all' command
2023-06-21 08:48:21 -04:00
Donatas Abraitis
508deadf3d tests: Adjust tests for BGP LU labelpool output
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-20 20:46:34 +03:00
Russ White
4d9fb376c8
Merge pull request #13728 from opensourcerouting/fix/addpath_drop_non_best_addpaths
bgpd: Implement neighbor X addpath-tx-best-selected command
2023-06-20 09:20:36 -04:00
Russ White
554c2e0350
Merge pull request #13750 from louis-6wind/fix-no-retain-memory-usage
bgpd: fix memory usage of vpn no retain
2023-06-20 09:19:50 -04:00
Russ White
c57667022c
Merge pull request #13769 from opensourcerouting/fix/bgp_peer-group_show_advertised
bgpd: Allow using peer-group for listing advertised-routes, etc.
2023-06-20 09:18:52 -04:00
Russ White
2cfc0ba8e9
Merge pull request #13665 from pguibert6WIND/issue_13616_pr
topotests: label per nexthop test adds add a while loop for mpls table
2023-06-20 09:18:16 -04:00
Russ White
514d3b397a
Merge pull request #13666 from pguibert6WIND/issue_13638_pr
topotests: structural issues in bgp_local_as_dotplus_private_remove
2023-06-20 09:17:51 -04:00
Russ White
68da3eab07
Merge pull request #13524 from pguibert6WIND/mpls_vpn_lsr_redistribute
MPLS vpn LSR redistribute
2023-06-20 09:13:33 -04:00
Russ White
56a10caa03
Merge pull request #12971 from taspelund/trey/mac_vrf_soo_upstream
bgpd: Add MAC-VRF Site-of-Origin support
2023-06-20 09:08:28 -04:00
Philippe Guibert
f2732f531f topotests: label per nexthop test adds add a while loop for mpls table
The bgp_vpnv4_per_nexthop_label tests only check to see if the mpls labels
are installed one time. Test runs show that all but one label is installed.
More than likely the test has asked for data while zebra is still installing
it. the mpls_label_check functions must check this result multiple times as
that system may be under heavy load.

A loop is introduced in order to let zebra check the mpls table.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-20 09:09:22 +02:00
Philippe Guibert
d1e16777d5 topotests: structural issues in bgp_local_as_dotplus_private_remove
This test has several issues:
A) The convergence function is spamming the show neighbor command until success,
if the neighbor never comes up the test will never finish. This adds unnecessary
load to an already loaded test system.  Use run_and_expect to properly wait for
the neighbor relationship to come up.
B) The convergence function should not sleep for 1 second *After* the neighbor
is established
C) The _bgp_as_path() function fails if the prefix has not been received yet.
This looking for the prefix data should be within a run_and_expect() functionality.
Else a loaded test system will fail in this function because while we may be in
an established state, prefixes might not yet have been exchanged and there is no
point in failing the test without giving the system some time to actually converge.

Fix those points, similarly to what has been fixed in
bgp_local_as_private_remove test.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-20 09:08:33 +02:00
Philippe Guibert
92550adfc7 bgpd: add 'set as-path exclude all' command
It is not possible to flush all the incoming as-path list
from a given BGP update.

Add a route-map set command to remove all as-paths
from a given AS path. Add the necessary tests.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-19 18:04:44 +02:00
Christian Hopps
df0173ceeb mgmtd: KISS the locking code
Move away from things like "lock if not locked" type code, require the
user has locked prior to geting to that point.

For now we warn if we are taking a lock we already had; however, this
should really be a failure point.

New requirements:

SETCFG -
  not implicit commit - requires user has locked candidate DS and they
    must unlock after

  implicit commit - requires user has locked candidate and running DS
    both locks will be unlocked on reply to the SETCFG

COMMITCFG -
  requires user has locked candidate and running DS and they must unlock
  after

  rollback - this code now get both locks and then does an unlock and
  early return thing on the adapter side. It needs to be un-special
  cased in follow up work that would also include tests for this
  functionality.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-19 00:13:28 -04:00
Louis Scalbert
e3d2aeac17 topotests: import vpn to default vrf in bgp_vpnv4_noretain
Test that importing VPN prefixes into the default VRF is possible with
the no retain feature.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:44 +02:00
Louis Scalbert
22dfa04b78 topotests: more tests in bgp_vpnv4_noretain
Add more VRFs in bgp_vpnv4_noretain and test combinations of no-retain
/ retain and import / un-import.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:34 +02:00
Louis Scalbert
d629c2f419 topotests: check protocol convergence at init in bgp_vpnv4_noretain
Check that the BGP session is Established before starting the tests.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:25 +02:00
Louis Scalbert
1a2b340892 topotests: check r2 vpn table in bgp_vpnv4_noretain
Remove no retain in r2 and check that r2 VPN table remains the same
after r1 configuration changes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:25 +02:00
Louis Scalbert
9aa2e5b1cd topotests: do not import r1 vrf1 to itself bgp_vpnv4_noretain
Do not import r1 vrf1 to itself in order to check that r1 vrf1 prefixes
are only in VPN table because it is needed for advertising the prefixes
to other routers.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:25 +02:00
Louis Scalbert
a92a2683a3 topotests: filter out void RD in bgp_vpnv4_noretain
Filter out route-distinguishers that have no prefix in "show bgp table
json"

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:25 +02:00
Louis Scalbert
fe993cb25f topotests: router relative variables in bgp_vpnv4_noretain
Change IP addresses, label, RD and RT to match the router number
and VRF number.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:25 +02:00
Louis Scalbert
bf636d3712 topotests: apply style to bgp_vpnv4_noretain
Apply style cosmetic changes to bgp_vpnv4_noretain with "black".

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:25 +02:00
Louis Scalbert
c2435c67f4 topotests: cosmetic changes to bgp_vpnv4_noretain
Cosmetic changes to bgp_vpnv4_noretain to prepare the next commit.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-16 14:18:25 +02:00
Philippe Guibert
7b3c6f8934 topotests: mpls vpn routes redistribution, add asbr test
This setup demonstrates the redistribution and the proper
switching operations in an asbr device.
The setup interconnects an internal AS with an external
connected AS.
- the iBGP AS uses BGP-LU as MPLS transport
- the eBGP peering is directly connected and does use the
'mpls bgp forwarding' configuration to accept exterior
updates.

The setup performs the following tests:
- it checks for end to end connectivity from one interior
host h1 to two external hosts h2, and h3.
- it checks that the proper label values are advertised
by the ASBR to the iBGP peer, and the eBGP peer.
- it checks that the 'show mpls table' has additional
MPLS entries that permit transit mpls traffic to transit
across the ASBR. That behaviour is possible with the
'mpls bgp allocate-label-on-nexthop-change' command.
- it checks that withdraw of routes will remve the MPLS
entries.
- it checks that by unconfiguring the 'next-hop-self' option,
the external routes advertised to the internal maintain the
next-hop.
- it checks that a second prefix advertised by r3 with the
same RD, but different label value is using a new label on r2,
and that this new label value is used.
- it checks that when filtering out prefixes from r1, on r2,
then the MPLS label is deallocated, and the MPLS entry is not
present.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-16 10:55:11 +02:00
Christian Hopps
78dfcceeae
Merge pull request #13767 from opensourcerouting/fix/convert_rip_topo1_to_polling
tests: Convert rip/ripng tests using run_and_expect
2023-06-13 04:20:49 -04:00