summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2022-01-28Merge pull request #10408 from idryzhov/no-opaque-by-defaultDonatas Abraitis
*: do not send opaque data to zebra by default
2022-01-28Merge pull request #10159 from taspelund/retain-peer-asnDonatas Abraitis
bgpd: retain peer asn even with remove-private-AS
2022-01-27Merge pull request #9880 from louis-oui/maximum-prefix-outDonatas Abraitis
bgpd: fixes maximum prefix out
2022-01-26topotests: set bgp peer-group with maximum-prefix-outLouis Scalbert
Set different combinations of bgp peer-group with a maximum-prefix-out value. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-01-26topotests: bgp no neighbor X.X.X.X maximum-prefix-out YLouis Scalbert
Test the ability to use the following configure command with a Y value: no neighbor X.X.X.X maximum-prefix-out Y Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-01-25Merge pull request #10411 from idryzhov/if-config-vrf-nameRuss White
*: do not print vrf name for interface config when using vrf-lite
2022-01-24tests: add topotest for remove-private-ASTrey Aspelund
Introduces a topotest to validate proper AS-Path manipulation when using "neighbor ... remove-private-AS". Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2022-01-24*: do not send opaque data to zebra by defaultIgor Ryzhov
Opaque data takes up a lot of memory when there are a lot of routes on the box. Given that this is just a cosmetic info, I propose to disable it by default to not shock people who start using FRR for the first time or upgrades from an old version. Fixes #10101. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2022-01-24*: do not print vrf name for interface config when using vrf-liteIgor Ryzhov
VRF name should not be printed in the config since 574445ec. The update was done for NB config output but I missed it for regular vty output. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2022-01-23Merge pull request #10318 from donaldsharp/redistributionRuss White
OSPF Redistribution
2022-01-23Merge pull request #10348 from ton31337/fix/gr_dynamic_neighbors2Russ White
bgpd: Graceful-restart / LLGR with dynamic peers
2022-01-20topotests: apply bgp maximum-prefix-out without clearing the neighborLouis Scalbert
The current maximum-prefix-out topo-test starts a configuration with a maximum-prefix-out. Test the application of new maximum-prefix-out value without clearing the neighbor. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-01-20topotests: isis vrf config changedPhilippe Guibert
Use vrf keyword for interface, and directly configure isis under that interface. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-01-19tests: Lower keepalive/hold/connect timers for BGP LLGR testDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-19tests: Check if LLGR works with dynamic peers as wellDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-18Merge pull request #10351 from mobash-rasool/topotest-ci-fixStephen Worley
tests: Fix random failure in test_PIM_hello_tx_rx_p1
2022-01-18Merge pull request #9938 from Orange-OpenSource/isis_lsRuss White
isisd: Add Link State Traffic Engineering support
2022-01-18Merge pull request #9644 from opensourcerouting/ospf-opaque-attrsRuss White
OSPF opaque route attributes
2022-01-18tests: Add ospf_instance_redistribute testingDonald Sharp
Redistribution for ospf with instance id's using instance id's was incorrect. Add some small tests to make sure it catches the issues and we don't regress. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-17Merge pull request #10183 from idryzhov/rework-vrf-renameRafael Zalamena
*: rework renaming the default VRF
2022-01-16tests: Fix random failure in test_PIM_hello_tx_rx_p1Mobashshera Rasool
The test case test_PIM_hello_tx_rx_p1 is failing randomly because sometimes the hello packet is received and sometimes not received while getting the stats data. When the hello packet is received HelloRx gets incremented to 1 and then shutdown of the interface is executed which resets the stats to 0 and again when "no shutdown" of the interface is done, the stats get incremented to 1. The test case checks after "no shutdown" of the interface whether the stats is incremented but in this case although the stats got incremented the before and after value is same. Hence the test case failed. Adding correct expectations in the test case. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-01-15tests: check if OSPF opaque attributes are installed in the RIBRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2022-01-14lib: add time formatting printfrr extsDavid Lamparter
Refer to docs in doc/developer for details. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-14lib: add `s` option to `pI4`/`pI6`/`pIA` printfrrDavid Lamparter
Adding an `s` after these printfrr specifiers replaces 0.0.0.0 / :: in the output with a star (`*`). This is primarily intended for use with multicast, e.g. to print `(*,G)`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-12pimd: move `%pSG4` to `%pPSG4`David Lamparter
Since this is only used in very few places, moving it out of the way is reasonable. (`%pSG` will be pim_sgaddr) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-08tests: BGP : Dynamic route leak VRF lite (BGP-GR)ARShreenidhi
Authored-by: Shreenidhi A R <rshreenidhi@vmware.com> Signed-off-by: Shreenidhi A R <rshreenidhi@vmware.com>
2022-01-07tests: Adopt bgp_shutdown_message test to a proper encodingDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-07Merge pull request #10301 from donaldsharp/pim_multicast_fixJafar Al-Gharaibeh
tools: Give longer for interface traffic in pim to work
2022-01-07Merge pull request #10290 from donaldsharp/nhrp_topo_queriesJafar Al-Gharaibeh
Nhrp topo queries
2022-01-07tests: Ensure packets have a chance to arrive in test_multicast_pim_sm_topo4.pyDonald Sharp
The test is doing this: a) gather interface data about packets sent b) shut interface c) no shut interface d) gather interface data about packets sent e) compare a to d and fail if packets sent/received has not incremented The problem is, of course, that under heavy system load insufficient time might not have passed for packets to be sent between c and d. Add up to 35 seconds of looking for packet data being incremented else heavily loaded systems may never show that data is being sent. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-07test: Cleanup via black the test_multicast_pim_sm_topo4.pyDonald Sharp
The test needed some cleanup via black formatting. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-07tests: Rename poorly named functionDonald Sharp
verify_pim_interface_traffic *fetches* the pim traffic data. Rename the function to what it actually does Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-06Merge pull request #10284 from ton31337/fix/adjust_rfc4486Donald Sharp
bgpd: Adjust symbolic names for cease notifications according to rfc4486
2022-01-06tests: Fixup output that was incorrect in nhrp_topoDonald Sharp
The nhrp_topo test sets up some infrastructure and was displaying the commands it was outputting incorrectly. Fix this. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-06bgpd: Graceful Restart restart-time can be 0Donatas Abraitis
Using with LLGR, this should be allowed setting GR restart-time timer to 0, to immediately start LLGR timers. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-06bgpd: Adjust symbolic names for cease notifications according to rfc4486Donatas Abraitis
The following subcodes are defined for the Cease NOTIFICATION message: Subcode Symbolic Name 1 Maximum Number of Prefixes Reached 2 Administrative Shutdown 3 Peer De-configured 4 Administrative Reset 5 Connection Rejected 6 Other Configuration Change 7 Connection Collision Resolution 8 Out of Resources Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-01-05topotests: require Linux 5.0 for NHRPDavid Lamparter
It fails on 4.19, so let's go minimum 5.0 for the time being. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-05Merge pull request #10260 from ton31337/feature/bgp_llgr_helper_modeRuss White
bgpd: Implement LLGR helper mode
2021-12-30Merge pull request #10219 from donaldsharp/l3vpn_to_bgp_vrf_fixesRuss White
tests: Further fix bgp_l3vpn_to_bgp_vrf
2021-12-28tests: Add basic BGP Long-lived Graceful restart testsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-12-22Merge pull request #8494 from donaldsharp/wfi_failuresDonatas Abraitis
bgpd, tests: Add code to handle failed installations
2021-12-21*: rework renaming the default VRFIgor Ryzhov
Currently, it is possible to rename the default VRF either by passing `-o` option to zebra or by creating a file in `/var/run/netns` and binding it to `/proc/self/ns/net`. In both cases, only zebra knows about the rename and other daemons learn about it only after they connect to zebra. This is a problem, because daemons may read their config before they connect to zebra. To handle this rename after the config is read, we have some special code in every single daemon, which is not very bad but not desirable in my opinion. But things are getting worse when we need to handle this in northbound layer as we have to manually rewrite the config nodes. This approach is already hacky, but still works as every daemon handles its own NB structures. But it is completely incompatible with the central management daemon architecture we are aiming for, as mgmtd doesn't even have a connection with zebra to learn from it. And it shouldn't have it, because operational state changes should never affect configuration. To solve the problem and simplify the code, I propose to expand the `-o` option to all daemons. By using the startup option, we let daemons know about the rename before they read their configs so we don't need any special code to deal with it. There's an easy way to pass the option to all daemons by using `frr_global_options` variable. Unfortunately, the second way of renaming by creating a file in `/var/run/netns` is incompatible with the new mgmtd architecture. Theoretically, we could force daemons to read their configs only after they connect to zebra, but it means adding even more code to handle a very specific use-case. And anyway this won't work for mgmtd as it doesn't have a connection with zebra. So I had to remove this option. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-12-21Merge pull request #10098 from opensourcerouting/ospf-gr-topotest-fixDonald Sharp
ospfd: fix incorrect detection of topology changes in helper mode
2021-12-17bgpd, tests: Add code to handle failed installationsDonald Sharp
Currently the Wait for Install code ( bgp_suppress_fib ) does not properly handle two states from zebra: ROUTE_INSTALL_FAILED and BETTER_ADMIN_DISTANCE_WON. Pre this change the WFI code would just never notify our peers about a route install failure but more is needed. In the ROUTE_INSTALL_FAILED and the BETTER_ADMIN_DISTANCE_WON we need to notify our peers with a withdrawal about the route, else we will continue to draw traffic to us when we cannot legally do so. Why is this needed? In either case imagine that we've already received a bgp route, installed it and sent to our peers. In the Better admin distance won case, say a static route is installed at this point in time we must stop advertising the route through us since we are not installed. As such a withdrawal must be sent. In the ROUTE_INSTALL_FAILED case, the code was not properly handling the situation where we have Route A, it was successfully installed and then we received a update to Route A that was attempted to be installed but failed. In this case we also need to send a withdrawal Finally update the bgp_suppress_fib topotest to test both of these situations. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-12-14tests: Further fix bgp_l3vpn_to_bgp_vrfDonald Sharp
There still existed chances that best path consideration has not taken place for both bgp_l3vpn_to_bgp_vrf and bgp_instance_del_test ( since they both used the same check_routes.py scripting ). Add some more checks to ensure that we have all the data. Prior to this change I could see one of these two tests failing every 2-3 runs on my test system. I am not seeing this anymore after ~5 complete test runs. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-12-11tests: test_ospf_lan.py is looking for a certain order enforce itDonald Sharp
OSPF when converging will choose a DR / Backup DR based upon who has already come up. Irrelevant of priority. As such if under system load OSPF comes up first and elects a DR that under normal circumstances not be the elected one due to priority OSPF does not go back through and re-elect to keep the system stable in this case. Tests are experiencing this: unet> r0 show ip ospf neigh Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 100.1.1.1 99 Full/Backup 4m14s 3.780s 10.0.1.2 r0-s1-eth0:10.0.1.1 0 0 0 100.1.1.2 0 Full/DROther 4m14s 3.848s 10.0.1.3 r0-s1-eth0:10.0.1.1 0 0 0 100.1.1.3 0 Full/DROther 4m14s 3.912s 10.0.1.4 r0-s1-eth0:10.0.1.1 0 0 0 unet> r1 show ip ospf neigh Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 100.1.1.0 98 Full/DR 4m15s 3.011s 10.0.1.1 r1-s1-eth1:10.0.1.2 0 0 0 100.1.1.2 0 Full/DROther 4m19s 3.124s 10.0.1.3 r1-s1-eth1:10.0.1.2 0 0 0 100.1.1.3 0 Full/DROther 4m19s 3.188s 10.0.1.4 r1-s1-eth1:10.0.1.2 0 0 0 unet> r2 show ip ospf neigh Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 100.1.1.0 98 Full/DR 4m27s 3.483s 10.0.1.1 r2-s1-eth0:10.0.1.3 0 0 0 100.1.1.1 99 Full/Backup 4m32s 3.527s 10.0.1.2 r2-s1-eth0:10.0.1.3 0 0 0 100.1.1.3 0 2-Way/DROther 4m32s 3.660s 10.0.1.4 r2-s1-eth0:10.0.1.3 0 0 0 unet> r3 show ip ospf neigh Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 100.1.1.0 98 Full/DR 4m55s 3.786s 10.0.1.1 r3-s1-eth1:10.0.1.4 0 0 0 100.1.1.1 99 Full/Backup 4m55s 3.829s 10.0.1.2 r3-s1-eth1:10.0.1.4 0 0 0 100.1.1.2 0 2-Way/DROther 4m54s 3.897s 10.0.1.3 r3-s1-eth1:10.0.1.4 0 0 0 Modify the test to do a clear to enforce the order we are specifically looking for. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-12-07Merge pull request #10135 from donaldsharp/ripng_faster_timersRuss White
tests: Allow ripng_topo1 to converge a bit faster
2021-12-03tests: Test if BGP session is up additionally for route_server_client setupDonatas Abraitis
Lower connect timer to 5 seconds as well. ``` FAILED test_bgp_route_server_client.py::test_bgp_route_server_client - AssertionError: Cannot see BGP GUA next hop from r3 in r1 ``` ``` 2021-12-02 14:41:21,115 INFO: topolog.r1: vtysh command => "show bgp 2001:db8:f::3/128 json" 2021-12-02 14:41:21,115 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh -c "show bgp 2001:db8:f::3/128 json" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None}) 2021-12-02 14:41:21,159 INFO: topolog.r1: vtysh result: { } ``` At least can't reproduce a failure locally (before managed to catch it). Ran >2000 times, no failure. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-12-02Merge pull request #9940 from pguibert6WIND/misc_topotestsRafael Zalamena
simplify some topotests config with naming default vrf
2021-12-02Merge pull request #9708 from mobash-rasool/new_bDonald Sharp
pimd: hello sent stats counter change and new flag addition to decide hello send