Commit Graph

1400 Commits

Author SHA1 Message Date
Don slice
0922d2e56e topotests: Add test for bgp update-delay configuration
Signed-off-by: Don Slice <dslice@nvidia.com>
2020-09-08 04:27:15 -07:00
Donatas Abraitis
a8b517846c
Merge pull request #7051 from donaldsharp/ospf_test_speedup
Ospf test speedup
2020-09-05 08:17:31 +03:00
Renato Westphal
b686742e2b
Merge pull request #6934 from Niral-Networks/niral_dev_vrf_isis_core_pr4
isisd, yang, doc : Support for different VRF in ISIS.
2020-09-04 18:44:56 -03:00
Donatas Abraitis
f6af4aecf4
Merge pull request #6826 from pjdruddy/bgp-auth-vrf-frr
Bgp auth vrf frr
2020-09-04 16:03:47 +03:00
Martin Winter
0c7b459c2c
Merge pull request #6926 from kuldeepkash/dynamic_route_leak
tests: Add bgp_vrf_dynamic_route_leak test suite
2020-09-03 19:03:22 +02:00
Donald Sharp
ff3218f5af tests: Reduce run time of bgp_l3vpn_to_bgp_vrf
Reduces run time of the bgp_l3vpn_to_bgp_vrf topotests
from ~118 seconds to ~87 seconds by reducing hello timers
in bgp and ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
f3ce48d31a tests: Reduce bfd-topo2 run time
Reduce run time of bfd-topo2 from ~62 seconds to ~33 seconds
by modifying the hello/dead intervals for both ospf and ospfv3

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
2022ed089e tests: Reduce ldp-oc-acl-topo1 run time
Reduce the ldp-oc-acl-topo1 test run time from ~69 seconds
to ~39 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
e1cbae1a2e tests: Reduce bgp-evpn-vxlan-topo1 run time
Reduce the runtime from ~82 seconds to ~51 seconds by
reducing hello/hold timers for both bgp and ospf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
0668365829 tests: Reduce ospf-topo1 run time
Reduce run time from ~114 seconds to ~55 seconds by
configuring hello/dead interval timers for ospf and ospfv3

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
20a91d054c tests: Reduce bgp_l3vpn_to_bgp_direct run time
Reduce run time from ~76 seconds to ~47 seconds by modifying
both bgp and ospf timers to be more aggressive

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
39adeb7617 tests: Reduce ldp-vpls-topo1 run time
Reduce this tests run time from ~76 seconds to ~49 seconds
by decreasing the hello/dead interval timers in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
8add049dfc tests: Speedup bgp_rfapi_basic_sanity run
Decrease run time from ~70 seconds to ~41 seconds by
reducing hello/dead interval timers in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
b17dd2a023 tests: Speedup bfd-profiles-topo1 runtime
Decrease run time from ~70 seconds to ~60 seconds
by modifying the hello/dead interval interface timers
in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
5a65e36b11 tests: Decrease ospf-sr-topo1 run time
Reduce ospf-sr-topo1 run time from ~60 seconds to ~30 seconds
by shortening the hello and dead timers.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
d23a0ba74c tests: ospf-topo2 speed up
Modify ospf hello/dead timers to speed up run time from ~25 seconds to
~17 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
14f2e6b50b tests: Modify ldp-oc-topo1 to run faster
Convert run times by lowering hello/dead interval timers to
smaller values from ~66 seconds to ~36 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
221bbedb11 tests: Speedup ldp-topo1 tests
These ospf timer changes, speed up convergence from ~85 seconds to
~40 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-03 10:54:16 -04:00
Donald Sharp
4e2286abc8 tests: Speed up bgp_features topotests by a lot
Initial run of topotests on my machine takes ~210 seconds
With these changes we are at ~40 seconds

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-09-02 15:47:14 -04:00
David Schweizer
251931afbd
tests: Enhance bgp_features topotest suite with tests for "bgp no-rib"
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2020-09-02 18:20:09 +02:00
Kuldeep Kashyap
985195f2b4 tests: Add bgp_vrf_dynamic_route_leak test suite
1. Added test to verify bgp vrf dynamic route leak functionality
2. Total execution time is ~8 mins
3. Added kernel version check, these script would be run for kernel version >= 4.19

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-09-01 16:11:24 +00:00
Kuldeep Kashyap
bc0a514728 tests: Add f/w support for bgp_vrf_dynamic_route_leak tests automation
1. Adding f/w support for bgp_vrf_dynamic_route_leak tests automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-09-01 15:48:10 +00:00
Pat Ruddy
318c1fa36f tests: topotest for bgp authentication
18 tests which cover
authenticated passord session extablishment
password removal
wrong password
over default, default prefix-based, vrf, vrf prefix-based, multi-vrf and
multi-vrf prefix-based configurations

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-09-01 09:42:39 +01:00
harios_niral
9375b5aa24 topotests : Topotest for different VRF in isisd
1. Topotest for isis-vrf is added for ipv4 and ipv6.
2. Test case for checking isis topology.
3. Test case for checking zebra isis routes.
4. Test case for checking linux vrf routes.
5. 2 new API's written in topotest/lib for checking vrf routes.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>"
Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-09-01 00:56:44 -07:00
harios_niral
65251ce80f doc, yang, isisd : Support for different VRF in isisd
1. Added isis with different vrf and it's dependecies.
2. Added new vrf leaf in yang.
3. A minor change for IF_DOWN_FROM_Z passing argrument is
   replaced with ifp pointer in api "isis_if_delete_hook()".
4. Minor fix in the isisd spf unit test.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>"
Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-09-01 00:48:05 -07:00
Rafael Zalamena
48a1bbdf76
Merge pull request #6925 from kuldeepkash/bgp_basic_functionality
tests: Add new tests to bgp-basic-functionality-topo1
2020-08-30 07:40:28 -03:00
Mark Stapp
cd79342c12 tests: small topotest improvements for python3
Avoid unnecessary use of StringIO in one place, use version-
dependent method in another. Remove a couple of other py2->py3
problems.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-08-28 10:10:46 -04:00
Kuldeep Kashyap
19f4da0bec tests: Add new tests to bgp-basic-functionality-topo1
1. Added new tests to bgp-basic-functionality-topo1
3. Execution time increased by 55 sec

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-08-28 12:24:20 +00:00
Renato Westphal
75aa7aa135 isisd: add abiliy to compute the reverse shortest path tree
RFC 7490 says:
 "The reverse SPF computes the cost from each remote node to root. This
  is achieved by running the normal SPF algorithm but using the link
  cost in the direction from the next hop back towards root in place of
  the link cost in the direction away from root towards the next hop".

Support for reverse SPF will be necessary later as it's one of the
algorithms used to compute R-LFA/TI-LFA repair paths.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-26 20:16:19 -03:00
Renato Westphal
52a7c25e63 tests, isisd: add IS-IS SPF unit tests
Now that the IS-IS SPF code is more modular, write some unit tests
for it.

This commit includes a new test program called "test_isis_spf" which
can load any test topology (there are 13 different ones available)
and run SPF on any desired node. In the future this same test program
and topologies will also be used to test reverse SPF and TI-LFA.

The "test_common.c" file contains helper functions used to parse the
topology descriptions from "test_topologies.c" into LSP databases
that can be used as an input to the SPF code.

This commit also introduces the F_ISIS_UNIT_TEST flag which is used
to prevent the IS-IS code from scheduling any event when running
under the context of an unit test.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-26 20:16:19 -03:00
Donald Sharp
c6d41e93e0
Merge pull request #5799 from pguibert6WIND/flowspec_ipv6
Flowspec ipv6
2020-08-26 08:26:46 -04:00
Donald Sharp
b532b92d31
Merge pull request #6988 from mjstapp/fix_topo_stop_logic
tests: improve topotest stop logic
2020-08-25 14:59:11 -04:00
Mark Stapp
942a224eae tests: fix router stop logic
Change the public router stop method to always do a two-phase
shutdown - once without waiting and a second time with a wait.
Ordinary callers need to use this approach when stopping routers.
Move the detailed internal details to a private method that tests
should not call directly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-08-25 10:52:17 -04:00
Mark Stapp
a85a3d1ef9 tests: remove some unused imports
Remove unused imports from some topojson tests

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-08-25 10:51:47 -04:00
Mark Stapp
af39fbe7df tests: include all daemons in all-proto error tests
Some daemons run in all-protocol-startup weren't included in
error-output testing.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-08-25 10:50:12 -04:00
Russ White
e3dcd431cd
Merge pull request #6938 from opensourcerouting/bgp-instance-shutdown
bgpd: BGP instance administrative shutdown
2020-08-25 10:31:01 -04:00
Donald Sharp
ce26564ed4
Merge pull request #6975 from opensourcerouting/topotest-zebra-nl-buf-size
topotests: bump zebra netlink socket buffer size
2020-08-25 08:00:56 -04:00
Renato Westphal
cd8ce25a70
Merge pull request #6726 from Orange-OpenSource/dev_ospf_sr
ospfd: Segment Routing Improvement
2020-08-24 16:23:45 -03:00
Rafael Zalamena
8e72eff7d8 topotests: bump zebra netlink socket buffer size
Use the same value as we use in production release configuration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-08-24 07:29:23 -03:00
Martin Winter
53d49b1a0e
tests: Cleanup and fix error message in bgp_features testsuite
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-08-21 13:46:02 +02:00
Philippe Guibert
e764d5faab topotest: add bgp flowspec ipv4/ipv6 test
this test ensures that an incoming bgp ipv4 and ipv6 flowspec
entry is received with a nexthop IP associated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-08-21 13:37:08 +02:00
Martin Winter
9104f54962
tests: Add new bgp_features testsuite with test for bgp shutdown
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-08-21 01:36:21 +02:00
Chirag Shah
390a886277 *: record transaction based on control flag
In case of config rollback is enabled,
record northbound transaction based on a control flag.
The actual frr daemons would set the flag to true via
nb_init from frr_init.
This will allow test daemon to bypass recording
transacation to db.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-08-20 14:12:04 -07:00
Olivier Dugeon
f786c4d7c9 OSPFd: Explicit Null option for Segment-Routing
Add new option to `segment-routing prefix` command to set the
Explcit Null flag in addition to the No-PHP flag. MPLS LFIB configuration
has been also updated to take into account the Explicit Null flag.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-08-20 15:51:48 +02:00
Olivier Dugeon
6f751f1493 ospfd: Add Segment Routing Local Block
RFC 8665 defines a Segment Routing Local Block for Adjacency SID.
This patch provides the possibility to modify the SRLB as well as
reserved the block range from the Label Manager.

 - Introduce new CLI 'segment-routing local-block'
 - Add local block to SRDB structure
 - Parse / Serialize SRLB in Router Information LSA
 - Update OSPF-SR topotest
 - Update documentation

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-08-20 14:37:40 +02:00
Kaushik
eab88f3655 isisd : Transformational changes to support different VRFs.
1. Created a structure "isis master".
2. All the changes are related to handle ISIS with different vrf.
3. A new variable added in structure "isis" to store the vrf name.
4. The display commands for isis is changed to support different VRFs.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-08-14 13:46:22 -07:00
Donald Sharp
40ce7a4203
Merge pull request #6889 from opensourcerouting/isisd-assorted-fixes
isisd minor fixes and enhancements
2020-08-14 12:50:03 -04:00
Donald Sharp
22c9bfb824
Merge pull request #6883 from pjdruddy/evpn-refactor
Evpn refactor
2020-08-14 09:02:25 -04:00
Donald Sharp
bbbfa7f77d
Merge pull request #6899 from opensourcerouting/bfd-knobs
bfdd: support passive mode and minimum TTL
2020-08-14 08:54:36 -04:00
Rafael Zalamena
39bea45c19 topotests: new BFD test for multi hop features
Add a new test to cover the new features for multi hop BFD peers:

- Test that we correctly receive TTL from protocol integration.
- Check minimum TTL usage and 'show' command.
- Check for passive mode.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-08-12 14:57:03 -03:00
Rafael Zalamena
360d6ca513 topotests: fix default BFD peer shutdown state
The commit `bfdd: simplify and remove duplicated code` fixed a problem
that was causing the protocol configuration to override the user
configuration.

In this test case: the peer was configured to be disabled (default is
`shutdown`) and the test was expecting it to get activated (`no shutdown`)
when the protocol converged. I changed the peer default state to
`no shutdown`, however another way to get the same effect is to
configure the protocol to use a profile or don't configure a peer at all
(and use the defaults).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-08-12 10:56:49 -03:00
Pat Ruddy
2d706c4e25 tests: remove ifindex from VNI JSON comparison
Since the values of ifindices cannot be relied upon across
distributions, simpy remove them from the VNI JSON being compared.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:33 +01:00
Pat Ruddy
578c52e5c0 tests: add EVPN IP learning tests
add tests to check IP address/MAC address associations are learned
from netlink NEWNEIGH messages and are propagated to the remote PE

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-08-12 12:39:33 +01:00
Donald Sharp
9d0843ac88
Merge pull request #6895 from mjstapp/fix_topo_vpls_timeout
tests: add time to ldp vpls testcase
2020-08-11 17:21:08 -04:00
Donald Sharp
659d56e13f
Merge pull request #6755 from xThaid/dplane_batching
zebra: dataplane batching
2020-08-11 13:59:12 -04:00
Mark Stapp
ceb71630ed
Merge pull request #6870 from donaldsharp/test_fixups
Test fixups
2020-08-11 12:40:52 -04:00
Mark Stapp
e513ad68d4 tests: add time to ldp vpls testcase
Add some more wait time to an LDP vpls testcase - it seems to have
trouble in the CI sometimes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-08-11 09:33:39 -04:00
Renato Westphal
f29b62b49d tests: tune some parameters to speed up the IS-IS SR topotest
With these changes the IS-IS SR topotest should run to completion
about twice as fast compared to before (4 -> 2 minutes on my
machine).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-11 01:00:56 -03:00
Jakub Urbańczyk
531c92b82f tests: zebra netlink testcases
Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-10 21:57:12 +02:00
Sebastien Merle
31f937fb43 lib, zebra: Add SR-TE policy infrastructure to zebra
For the sake of Segment Routing (SR) and Traffic Engineering (TE)
Policies there's a need for additional infrastructure within zebra.
The infrastructure in this PR is supposed to manage such policies
in terms of installing binding SIDs and LSPs. Also it is capable of
managing MPLS labels using the label manager, keeping track of
nexthops (for resolving labels) and notifying interested parties about
changes of a policy/LSP state. Further it enables a route map mechanism
for BGP and SR-TE colors such that learned BGP routes can be mapped
onto SR-TE Policies.

This PR does not introduce any usable features by now, it is just
infrastructure for other upcoming PRs which will introduce 'pathd',
a new SR-TE daemon.

Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-08-07 11:08:49 +02:00
Donald Sharp
dbb0ba05aa tests: no learning is not accepted
The vxlan `ip... ` command is failing because we are passing in
`no learning` and that is failing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-08-06 16:32:04 -04:00
Donald Sharp
2055cbee81 tests: Add some small clues to what dut is having the issue
Add a bit of a clue to the test_evpn_type5_topo1.py script
to what dut is failing, when things go south.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-08-06 16:31:06 -04:00
Donald Sharp
99ecb5a571
Merge pull request #6873 from mjstapp/fix_topo_retry_sigterm
tests: stop daemons consistently in mem leak path
2020-08-06 16:28:25 -04:00
Rafael Zalamena
084cb75254
Merge pull request #6587 from AnuradhaKaruppiah/evpn-mh-pr-1
EVPN Multihoming part-1
2020-08-06 19:49:14 +00:00
Mark Stapp
d2bdb82ffd tests: stop daemons consistently in mem leak path
When the topotest mem-leak reporting is enabled, use the same
two-step daemon stop procedure that's used in
the topogen.stop_topology path.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-08-06 11:47:12 -04:00
Donatas Abraitis
2b42623bd3
Merge pull request #6847 from donaldsharp/time_to_rerun
Time to rerun
2020-08-05 17:34:46 +03:00
Anuradha Karuppiah
df98b92c12 topotests: initial set of tests for evpn multihoming
The base topology is a two level CLOS with two racks. There are
two PEs/TORs in each rack that provide active-active redundancy to
two dual-attached servers in the rack. And EVPN-PIM is used for
flooded traffic.
Reference: evpn-mh-topo-tests.pdf

Tests have been added for the following functionality -
1. ES management
2. EAD/Type-1 route handling
3. Type-2 route with non-zero ESI
4. MAC sync and remote MAC (with remote-ES destination) handling

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05 06:46:13 -07:00
Donald Sharp
b34232cf86 lib, tests: Add notation about whether or not a route-map is about to be reprocessed
When you make a change to a route-map or a prefix-list it depends on, note
that the route-map needs to be reprocessed for the change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-08-04 10:16:09 -04:00
Rafael Zalamena
50ecf9dc14 topotests: remove sharpd from route map output
`sharpd` doesn't handle any route map commands and neither should show
up in route map commands. This makes the CI pass again after not sending
route map commands to it again.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-08-03 21:21:14 -03:00
Mark Stapp
76e036e4b0 tests: Avoid top ecmp route_scale test case when memory limited
Address-sanitizer runs in the CI appear to require more
memory than is available (at present), so skip the top
x32 route_scale testcase when running with <4G of ram.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-30 14:23:52 -04:00
Mark Stapp
0ae6467f0e tests: rework route_scale topotest
Make some changes to the route-scale topotest, in view of
issue #6734. Table-drive the test to eliminate some
repeated code. Assert and fail if a step in the progression
of scale fails. Wait a little longer between checking the show
output - it's costly to generate that output at scale. Add a
memleak testcase.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-30 14:23:52 -04:00
Kuldeep Kashyap
e66778d007 tests: Skipping evpn_type5_test_topo1 tests from CI runs
1. evpn_type5_test_topo1 tests started failing in CI for all Ubuntu 18.04 machine,
which are having kernel version: 5.4.0-42-generic
2. We will enable these tests once issue is found and fixed.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-30 14:29:25 +00:00
Donald Sharp
c19e12b74f tests: Remove 'log monitor' from tests
The `log monitor' command is a no-op and actually
outputs a `this doesn't do anything` warning.  Let's remove
this cli line from our tests as that don't do anything and
people will look at these configs for guidance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-07-27 11:09:16 -04:00
Mark Stapp
6c4b304f33
Merge pull request #6662 from kuldeepkash/evpn_type2_tests
tests: Adding test suites evpn_type5_test_topo1
2020-07-27 08:16:31 -04:00
Russ White
a90f46738a
Merge pull request #6730 from wesleycoakley/pbrd-dscp-ecn
DSCP / ECN-based PBR Matching
2020-07-23 12:08:38 -04:00
Kuldeep Kashyap
1b66072ce0 tests: Adding test suites evpn_type5_test_topo1
1. Added 15 test cases to test evpn type5 functionality
2. Total execution time is ~9 mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-22 09:04:16 +00:00
Kuldeep Kashyap
3c334c3915 tests: Adding framework support for EVPN-Type5 automation
1. Added APIs to create evpn related config.
2. Added APIs to verify evpn config and routes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-22 06:12:55 +00:00
Quentin Young
65b86778c1
Merge pull request #6711 from GalaxyGorilla/bfd_isis_profiles
Add BFD profiles for IS-IS
2020-07-21 14:45:31 -04:00
Donald Sharp
3eb15671ee
Merge pull request #6731 from opensourcerouting/style-string-prep
*: string coding style
2020-07-15 20:06:55 -04:00
Donald Sharp
c71ff7a60e
Merge pull request #6746 from opensourcerouting/topotests-wtf
topotests: stop the zombie apocalypse
2020-07-15 20:04:07 -04:00
Wesley Coakley
4402515921 tests: expand pbr-topo1 to cover DSCP & ECN
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2020-07-15 12:59:36 -04:00
David Lamparter
f033a78a99 topotests: stop wasting time at exit
... and clean up zombie child processes

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-07-15 18:50:30 +02:00
David Lamparter
ba5410e32f topotests: update Dockerfile
... python3 is non-optional now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-07-15 18:50:12 +02:00
David Lamparter
79f6fdeb3f topotests: unshittify backtraces
add thread info, use "bt full" to get variables and add a bit of
disassembly for good measure.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-07-15 18:48:57 +02:00
Kuldeep Kashyap
f6f20a77e8 tests: [topojson] Increase BGP convergence wait time
1. Increasing BGP convergence wait time to overcome Ubuntu 16.04 arm8 box, as
bgp neighorship is taking more time in this particular testbed.
2. Debugged bgp-ecmp-topo2 failures and here also it seems to be bgp convergence
issue, doing some enhancement in scripts to handle it

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-14 13:09:06 +00:00
David Lamparter
3efd0893d0 *: un-split strings across lines
Remove mid-string line breaks, cf. workflow doc:

  .. [#tool_style_conflicts] For example, lines over 80 characters are allowed
     for text strings to make it possible to search the code for them: please
     see `Linux kernel style (breaking long lines and strings)
     <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_
     and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_.

Scripted commit, idempotent to running:
```
python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'`
```

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-07-14 10:37:25 +02:00
Donatas Abraitis
635cc1ec60 tests: Remove bgp_show_ip_bgp_fqdn test
Not really relevant for now.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-07-10 20:33:10 +03:00
Donald Sharp
373edbbc99
Merge pull request #6530 from mjstapp/backup_nhg_notify
lib, zebra: async notifications for backup routes and LSPs
2020-07-10 10:54:59 -04:00
GalaxyGorilla
a29bea9947 tests: align BFD profiles tests for IS-IS
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-07-10 11:29:32 +00:00
Donald Sharp
eb94db103c
Merge pull request #6703 from mjstapp/fix_bgp_30_secs
tests: print actual time spent waiting for bgp convergence
2020-07-09 20:29:08 -04:00
Donald Sharp
af83fd8b7b
Merge pull request #6709 from mjstapp/fix_topo_ipaddr
tests: use ipaddress module; tolerate missing support bundle file
2020-07-09 20:20:36 -04:00
Mark Stapp
8b547a6dab test: use ipaddress module instead of ipaddr
Use the standard ipaddress module instead of installing 'ipaddr',
which may be deprecated now.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-09 12:32:10 -04:00
Mark Stapp
7172f19da4 tests: don't fail topotests if bundle file not present
Test for the existence of the support_bundle conf file before
trying to access it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-09 12:13:55 -04:00
Mark Stapp
526d442fe4 tests: print actual time spent waiting for bgp convergence
Stop printing hard-coded 30 seconds in a couple of places in
bgp.py in the topojson infra - print the actual time
spent waiting.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-09 09:51:16 -04:00
Renato Westphal
4030687aab
Merge pull request #6385 from GalaxyGorilla/bfd_igp_topotest
isis: tests: Fast RIB recovery from BFD recognized link failures
2020-07-08 14:38:09 -03:00
Mark Stapp
6b193087ca staticd,zebra: use ALLOW_RECURSION for static routes
Remove a special-case clause for static routes - it was the same
as the clause for other recursive routes. Have staticd just tell
zebra that recursion is allowed. Update topotest that was aware
of this 'internal' flag.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-07 13:14:01 -04:00
Kuldeep Kashyap
c39fe454e2 tests: Generate support bundle/dump data on tests failures
1. It will generate support bundle/sump data on test failures
2. It used /usr/lib/frr/generate_support_bundle.py utility to dump the data

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-07 16:02:22 +00:00
Mark Stapp
3a298c75fd
Merge pull request #6685 from donaldsharp/fix_rare_ospf_test_failure
tests: Fix rare case in ospf tests due to small hello timer
2020-07-07 10:38:26 -04:00
Mark Stapp
58923d880f tests: fix short timeout in lib/bgp.py
Another short timeout for bgp - make the
verify_bgp_convergence_from_running_config() api use the same
generous timeout as verify_bgp_convergence()

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-07 08:25:01 -04:00
Donald Sharp
a2ab6fd8fa tests: Fix rare case in ospf tests due to small hello timer
There exists the possiblity that the hello timer printed would
show a time to expiration in this format:

Hello due in 350 usecs

The tests are looking for:

Hello due in 5.430s

Just notice that we may have gotten usecs and act accordingly

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-07-07 07:36:54 -04:00
Kuldeep Kashyap
6fef4969ef tests: Add bgp_recursive_route_ebgp_multi_hop test suite
1. Added 7 test cases to verify bgp recursive nexthop and ebgp multi-hop functionality
2. Added framework support to automate these test cases
3. Total execution time is ~5 mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-07-06 10:05:53 +00:00
Mark Stapp
cb3e512d97 tests,zebra: fix more startup topotest issues
Use the right list of daemons to avoid trying to start zebra twice.
Change a zebra log message to INFO level to avoid stderr check
failure.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-04 12:25:10 -04:00
Mark Stapp
cf865d1b7c tests: wait longer when shutting down in topotests
Add a few retries during router shutdown before killing a daemon. Also
work harder to start only a single instance of daemons, esp. zebra.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-07-03 13:22:42 -04:00
GalaxyGorilla
a01cb26cae tests: Introduce BFD IS-IS topotests
The tests work with the default settings of BFD meaning that bfdd is
able to recognize a 'down' link after ~900ms so a route recovery should
be visible in the RIB after 1 second.

In the current state only IPv4 is used (when using IPv6
autoconfiguration) within BFD, even though the recovery also affects
IPv6 routes. This is different to the current state of ospfd/ospf6d in
combination with BFD since both IPv4 and IPv6 sessions are used there.

The following topology is used:

                        +---------+
                        |         |
           eth-rt2 (.1) |   RT1   | eth-rt3 (.1)
             +----------+ 1.1.1.1 +----------+
             |          |         |          |
             |          +---------+          |
             |                               |
             |                   10.0.2.0/24 |
             |                               |
             |                       eth-rt1 | (.2)
             | 10.0.1.0/24              +----+----+
             |                          |         |
             |                          |   RT3   |
             |                          | 3.3.3.3 |
             |                          |         |
        (.2) | eth-rt1                  +----+----+
        +----+----+                  eth-rt4 | (.1)
        |         |                          |
        |   RT2   |                          |
        | 2.2.2.2 |              10.0.4.0/24 |
        |         |                          |
        +----+----+                          |
        (.1) | eth-rt5               eth-rt3 | (.2)
             |                          +----+----+
             |                          |         |
             |                          |   RT4   |
             |                          | 4.4.4.4 |
             |                          |         |
             |                          +----+----+
             | 10.0.3.0/24           eth-rt5 | (.1)
             |                               |
             |                               |
             |                   10.0.5.0/24 |
             |                               |
             |          +---------+          |
             |          |         |          |
             +----------+   RT5   +----------+
           eth-rt2 (.2) | 5.5.5.5 | eth-rt4 (.2)
                        |         |
                        +---------+

Route recovery is tested on RT1. The focus here lies on the two
different routes to RT5. Link failures are generated by taking
down interfaces via the mininet Python interface on RT2 and RT3.
Hence routes are supposed to be adjusted to use RT3 when a link
failure happens on RT2 or vice versa.

Note that only failure recognition and recovery is "fast". BFD
does not monitor a link becoming available again.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-07-03 08:42:34 +00:00
Rafael Zalamena
9ce4f4b86b topotests: remove daemons start up sleep
Instead of waiting for daemons start with `sleep`, start them with the
`-d` parameter so they can release the terminal themselves when ready.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-07-02 14:52:46 -03:00
Rafael Zalamena
1455684740 topotests: start logging early
Start logging early everything (including debug) to
`/tmp/topotest/<test>/<node>/<daemon>.{out,err}`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-07-02 14:52:46 -03:00
Rafael Zalamena
aa5261bf7d topotests: remove duplicated code
Handle the duplicated code with a simple conditional: if called from
specialized API use provided daemons configuration, otherwise fallback
to old `Router` own daemon settings.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-07-02 14:52:42 -03:00
Donald Sharp
7799deeed6
Merge pull request #6437 from opensourcerouting/bfd-profiles-bgp
bfdd,bgpd: profiles integration support
2020-07-02 12:22:44 -04:00
Donald Sharp
272ed0af32 tests: pbr is not working properly on arm 4.9 kernels
Just disable pbr tests on anything less than 4.10.

This has to do with the fact that the arm platform
is not allowing us to install a route into a
non default table using a interface associated
with a vrf.

ip route add default 4.5.6.7 via swp39 table 10000

When swp39 is in a vrf other than default

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-30 15:10:20 -04:00
Donatas Abraitis
f48e3fa9e5
Merge pull request #6643 from mjstapp/fix_typos_bgp_multivrf1
test: fix some typos in bgp_multi_vrf_topo1
2020-06-27 18:41:20 +03:00
Donald Sharp
2cb8bfb247 tests: Add some more data gathering
From last addition we can tell that the nexthop-group C is
installed but pbr does not think it is.  This failure
has been consistent the last 4-5 runs in master.  Lets
add a bit more data gathering to figure out what is going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-26 07:10:08 -04:00
Mark Stapp
8171368be7 test: fix some typos in bgp_multi_vrf_topo1
Noticed a few text things in this topotest.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-25 13:43:37 -04:00
Donald Sharp
0ce2d6ba13
Merge pull request #6630 from opensourcerouting/bgp-node-dest-rename
bgp: rename bgp_node to bgp_dest
2020-06-25 09:14:18 -04:00
Mark Stapp
c4f9205763 tests: fix interface and debug config diff in topojson framework
Include vrf name with interface name when topojson framework
generates interface configuration. This matches the output of
'show runn', and makes config reset less disruptive. Also
stop removing configured debugs and log output when re-generating
config.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-24 11:27:15 -04:00
Donald Sharp
d9a34de19f tests: the pbr topo1 test is failing gather data to help debug
This may be expanded in the future as we figure out more things
to gather when the test has gone south.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-23 13:18:35 -04:00
Donald Sharp
9bcb3eef54 bgp: rename bgp_node to bgp_dest
This is the bulk part extracted from "bgpd: Convert from `struct
bgp_node` to `struct bgp_dest`".  It should not result in any functional
change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-06-23 17:32:52 +02:00
Rafael Zalamena
65e3e8484b topotests: bump BFD test convergence time
Lets make the test more resilient to failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-18 08:42:11 -03:00
Rafael Zalamena
0a901ebcb6 topotests: remove old FRR version support
Removes a few lines of code.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-18 08:02:34 -03:00
Philippe Guibert
9b222c1f1a
Merge pull request #6577 from rtrlib/2020-06-12-master-fixes
bgpd: rpki fixes (master)
2020-06-17 09:09:02 +02:00
Donald Sharp
36952a8218 tests: Modify pbr test to give a reasonable amount of time to succeed
Under heavy load some systems may still be processing.  Let's give
the system some time to figure out what is going wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-15 16:59:38 -04:00
Marcel Röthke
bac31cb885 bgpd: fix rpki revalidation for invalid announcements
Announcements that are marked as invalid were previously not revalidated.
This was fixed by replacing the range lookup with a subtree lookup.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2020-06-15 18:22:37 +02:00
Rafael Zalamena
a1e0142dce topotest: add tests for BFD profiles
Import a topology with some protocols that integrate with BFD. As other
daemons get the new BFD profile support we can update the test to cover
them.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-12 14:25:53 -03:00
Donatas Abraitis
f8e30433f6
Merge pull request #6563 from donaldsharp/scale_tests
tests: Add some scale tests to ensure things work
2020-06-12 09:11:09 +03:00
Donald Sharp
6a6f3d5a60 tests: After clear give it more than 90 seconds to come up
Error Message seen:
2020-06-11 14:00:35,288 ERROR: assert failed at "test_ebgp_ecmp_topo2/test_ecmp_after_clear_bgp[redist_static]": Testcase test_ecmp_after_clear_bgp[redist_static] : Failed
   Error: TIMEOUT!! BGP is not converged in 30 seconds for router r3
assert 'TIMEOUT!! BGP is not converged in 30 seconds for router r3' is True

if a retry for a failed connection is 120 seconds we should wait slightly
longer than a retry session, which this clear test was not doing.
Especially since we know our topotests are lossy on data under load.

Apparently I changed this earlier to 90 seconds, but a retry window
is 120.  Not sure wtf I was thinking

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-11 09:53:05 -04:00
Donald Sharp
bbbd12f197 tests: Add some scale tests to ensure things work
Add some basic route scale tests to ensure that we can
install a large number of routes.  Also grab some timings
so that we can keep track and see if anything substantially
changes over time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-10 23:12:34 -04:00
Donald Sharp
05e0e7dddc
Merge pull request #6555 from mjstapp/fix_ebgp_policy_topo_timeout
tests: raise convergence timeout in bgp_ebgp_requires_policy
2020-06-10 13:56:38 -04:00
Mark Stapp
8e0991305d tests: raise convergence timeout in bgp_ebgp_requires_policy
Timeout was 30 seconds, raise it to 130.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-10 11:01:47 -04:00
Jakub Urbańczyk
9b7decf28e topotest: add pbr test suite
Add some basic tests for installing PBR rules into the kernel.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-06-10 16:29:14 +02:00
Donald Sharp
71af56b190
Merge pull request #6544 from mjstapp/fix_topo_lib_bgp_timeout
tests: include lib/bgp.py convergence timeout to 130
2020-06-10 09:19:26 -04:00
Mark Stapp
6bb1a16f83
Merge pull request #6532 from wesleycoakley/pbrd-moretopo
tests: Expand pbrd topology tests
2020-06-10 08:14:39 -04:00
Mark Stapp
bfab324148 tests: include lib/bgp.py convergence timeout to 130
The convergence timeout in lib/bgp.py was something like 40 secs;
that's not really long enough for the CI. Raise the timeout to
40 x 3 secs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-10 08:14:08 -04:00
Rafael Zalamena
7f3197922e topotests: MPLS table output is not ordered
Don't expect ordered output from `show mpls table json`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-09 18:45:29 -03:00
Mark Stapp
fe171b4e1a
Merge pull request #6510 from donaldsharp/useful_timings
tests: Allow a useful amount of time for bgp to converge
2020-06-09 15:15:04 -04:00
Rafael Zalamena
19d4fe6566 topotests: stabilize ospf-sr-topo1 run
Use `json_cmp` instead of raw text comparison. It should fix some of the
ordering problems we are seeing in CI runs.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-08 16:14:41 -03:00
Rafael Zalamena
c2088e52fc topotests: remove old FRR version check
Topotest is now part of FRR repo and the code is versioned with the
tests.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-08 16:13:25 -03:00
Wesley Coakley
11e33e0075 tests: pbr topotest verifying vrf functionality
Creates a VRF in the kernel and tests areas of pbrd not covered before

Signed-off-by: Wesley Coakley <wcoakley@cumulusnetworks.com>
2020-06-08 14:27:29 -04:00
Wesley Coakley
b046dc8716 tests: pbr topotest flaps ifaces, maps, nh-groups
Signed-off-by: Wesley Coakley <wcoakley@cumulusnetworks.com>
2020-06-08 14:27:21 -04:00
Wesley Coakley
38b5ed4b42 tests: pbr topotests variety of maps and nh-groups
Signed-off-by: Wesley Coakley <wcoakley@cumulusnetworks.com>
2020-06-08 14:12:46 -04:00
Olivier Dugeon
008bcff499 ospfd: OSPF Segment Routing topostest update
Update OSPF Segment Routing topotest in conformity to ECMP
 - Add one more interface between r1 and r2 for ECMP
 - Anonymize Adjacency SID
 - Update expected json output

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-06-03 19:35:47 +02:00
Donald Sharp
9ccb078de1 tests: Allow a useful amount of time for bgp to converge
The bgp_as_wide_bgp_identifier test can time out after
30 seconds waiting for convergence.  This is of course
a problem in our test setup where we know that convergence
can fail on first startup due to load issues in the
topology.  Additionally we also know that our default time
for bgp sessions is 120 seconds to retry.  Give things
a bit longer than 120 seconds to actually fail
instead of 30 seconds

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-02 22:16:54 -04:00
Russ White
b12b5d2097
Merge pull request #6442 from wesleycoakley/pbrd-showjson
pbrd: Optional JSON output for all `show pbr` directives
2020-06-01 07:44:36 -04:00
Donald Sharp
b1ab2bd2df tests: Add a basic test for pbr
Just add a basic test for pbr.  This code
does not actually test installation in the kernel at this
point in time.

What we do do is make sure pbr is in a sane state after
some very basic configuration.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-29 16:56:20 -04:00
Donald Sharp
223f87f4db tests: Setup very basic pbr tests for our topology tests
Just a simple setup for pbr to prove it starts.  Once the json
code for pbr gets in we can add more.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-29 16:56:14 -04:00
Renato Westphal
ca4f4a3660
Merge pull request #6416 from Orange-OpenSource/master
ospfd: Solve crash after removing and adding conf.
2020-05-28 20:03:43 -03:00
Donald Sharp
2011994ee6
Merge pull request #6447 from opensourcerouting/rename-bgp-vrf-leak
topotest: refactory BGP VRF leak basic test
2020-05-27 10:34:13 -04:00
Olivier Dugeon
731271b0bd ospfd: Solve crash after removing and adding conf.
Issue number #6291 describes how OSPFd crashes after being deleted and then
added again with configuration when segment routing is used.

The problem occurs in ospf_ri.c because the OspfRI structures retains
the reference to the old area pointer which is mofified when ospfd is
reactivated by configuration. When segment routing is activated, the LSA Router
Information is sent with reference to the old area pointer, instead the new one,
which causes the crash. The same problem is also present in ospf_ext.c with
OspfEXT structure and Extended Link/Prefix structure.

This commit introduces Extended Link/Prefix and Router Information LSAs flusing
when OSPFd is stopped when configuration is removed and adds the correct
initialization to the area pointer in OspfRI and Extended Link/Prefix structure
when OSPFd is re-enabled with the configuration. Area pointer has been removed
from the OspfEXT structure as it is never used with this commit.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-05-26 11:57:04 +02:00
Rafael Zalamena
8df8e15665 topotest: refactory BGP VRF leak basic test
Changes:
- Renamed file so we don't get confused when it fails.
- Use `json_cmp` instead of direct key access.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-05-24 17:54:00 -03:00
Donald Sharp
a0764a368f tests: Turn on nhrpd and babeld as part of all-protocol-startup
Turn on a few more daemons to run during this test.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-23 19:44:04 -04:00
GalaxyGorilla
b3100f6ce7 tests: Fix JSON diff for nested lists
The involved piece of code is supposed to find a 'closest' match for two
JSON structures using another JSON diff. However, it can happen that
during that new diff the JSON structures are altered (elements from a
list are deleted when 'found'). This is in general ok when the deleted
element is part of the JSON structure which 'matches', but when it later
turns out that some other element of the structure doesn't fit, then the
whole structure should be recovered. This is now realized by using a
deepcopy for the besaid new JSON diff such that the original is only
altered (e.g. deleted) when the diff is clean.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-05-22 22:29:35 +00:00
Donald Sharp
6109dd7e22
Merge pull request #6293 from GalaxyGorilla/json_diff
tests: introduce a proper JSON diff for topotests
2020-05-21 14:19:44 -04:00