Commit Graph

29152 Commits

Author SHA1 Message Date
Donatas Abraitis
c0fcf5cd8f
Merge pull request #11248 from donaldsharp/fix_pbr_topo1
tests: pbr_topo1 sometimes fails under really heavy load
2022-05-24 17:49:24 +03:00
Donatas Abraitis
8fbc0ab6bb docker: Install systemd-devel for centos7 build
```
error: Failed build dependencies:
	systemd-devel is needed by frr-8.3_git275938094422-01.el7.x86_64
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 17:27:41 +03:00
Donatas Abraitis
91dd071e9a docker: Use librtr 0.8.0 for centos/ubi builds
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 17:18:14 +03:00
Donatas Abraitis
0285264253 bgpd: Drop redundand output under show rpki prefix-table
This is already handled by a separate command `show rpki cache-server`.

Probably just copy/paste error.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 16:18:11 +03:00
Donald Sharp
882a8c7a71 tests: Allow cspf_topo1 to function correctly at scale
The cspf_topo1 test is comparing the adj-sid value that is
assigned dynamically based upon bring up order.  Under very
large scale this order changes causing the test to fail.
Since the adj-sid is dynamically allocated and appears to
be tested elsewhere, let's remove it from the grab all check.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-24 09:15:40 -04:00
Donatas Abraitis
4d4b9dc172 bgpd: Put ssh_config->port as integer, not as string in RPKI code
tcp_host->port is a string, ssh_config->port is an integer...

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 14:56:45 +03:00
Donald Sharp
403f312d56
Merge pull request #11256 from opensourcerouting/feature/bgp_rpki_json
bgpd: Add JSON output for `show rpki cache-connection`
2022-05-24 07:51:24 -04:00
Donald Sharp
5f3279aa37
Merge pull request #11261 from opensourcerouting/fix/double_notify_atomic
bgpd: Don't increment twice notification sent stats counter
2022-05-24 07:50:26 -04:00
Louis Scalbert
c8d2816ee5 topotests: isis-lfa add a switchover test after BFD down
Add a switchover test that consists in:
- Setting up ISIS BFD between rt1 and rt2
- The no link-detect setting on rt1 eth-rt2 is still present so that
  zebra does not take account linkdown events on this interface.
- Shutting down rt1 eth-rt2 from the switch side
- Wait for BFD to comes down

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
9cdc099bb5 topotests: isis-lfa add a switchover test after neighbor clear
Add a switchover test that consists in clearing the rt2 neighbor on rt1.

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
c99ef48962 topotests: isis-lfa add a switchover test after hello timeout
Add a switchover test that consists in:
- Setting no link-detect on rt1 eth-rt2 so that zebra does not take
  account linkdown events on this interface.
- Shutting down rt1 eth-rt2 from the switch side
- Wait for the hello timer expiration

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
5558ac984f topotests: isis-lfa add a switchover test after linkdown
Add a switchover test that consists in shutting down an interface.

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
d95cd33545 isisd: fix SPF scheduling on IPv6 only topology
If ISIS is running on an IPv6 only topology, the command "spf interval"
has no effect.

Only the IPv4 SPF tree timers are taken into account.

Base the next SPF scheduling on the last running SPF tree.

Fixes: be985ba059 ("isisd: make use of advanced concepts like arrays and loops")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
e45958e9cf isisd: fix metric calculation of classic lfa backup prefixes
The isis-lfa-topo1 topotest shows backup routes with lower metrics than
the primary ones.

> rt1# show isis route
> Area 1:
> IS-IS L1 IPv6 routing table:
>
>  Prefix                Metric  Interface  Nexthop                    Label(s)
>  ------------------------------------------------------------------------------
>  2001:db8:1000::1/128  0       -          -                          -
>  2001:db8:1000::2/128  20      eth-rt2    fe80::d091:eeff:fe09:31cd  -
>  2001:db8:1000::3/128  20      eth-rt3    fe80::946b:d4ff:fe5b:414b  -
>  2001:db8:1000::4/128  20      eth-rt4    fe80::5ced:29ff:feed:59c4  -
> (...)
>
> rt1# show isis route backup
> Area 1:
> IS-IS L1 IPv6 routing table:
>
>  Prefix                Metric  Interface  Nexthop                    Label(s)
>  ------------------------------------------------------------------------------
>  2001:db8:1000::2/128  15      eth-rt3    fe80::946b:d4ff:fe5b:414b  -
>                                eth-rt5    fe80::847d:feff:fe74:bdde  -
>                                eth-rt6    fe80::ac8c:dff:feac:8a8d   -
>  2001:db8:1000::3/128  15      eth-rt2    fe80::d091:eeff:fe09:31cd  -
>                                eth-rt5    fe80::847d:feff:fe74:bdde  -
>  2001:db8:1000::4/128  45      eth-rt5    fe80::847d:feff:fe74:bdde  -
> (...)

Backup routes metrics are incorrect because they only take into account
the path metric but not the prefix metric.

Add the prefix metric to the path metric on backup routes.

After the patch with a prefix metric of 10:

> rt1# show isis route backup
> Area 1:
> IS-IS L1 IPv6 routing table:
>
> Area 1:
> IS-IS L1 IPv6 routing table:
>
>  Prefix                Metric  Interface  Nexthop                    Label(s)
>  ------------------------------------------------------------------------------
>  2001:db8:1000::2/128  25      eth-rt3    fe80::8c6f:8aff:fe10:ad0d  -
>                                eth-rt5    fe80::b08e:5cff:fe90:62dd  -
>                                eth-rt6    fe80::4810:47ff:fe81:2b9a  -
>  2001:db8:1000::3/128  25      eth-rt2    fe80::e855:12ff:fe31:5765  -
>                                eth-rt5    fe80::b08e:5cff:fe90:62dd  -
>  2001:db8:1000::4/128  55      eth-rt5    fe80::b08e:5cff:fe90:62dd  -

Fixes: e886416f81 ("isisd: add support for classic LFA (RFC 5286)")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
e83a52698b topotests: isis-tilfa add a switchover test after BFD down
Add a switchover test that consists in:
- Setting up ISIS BFD between rt5 and rt6
- Setting no link-detect on rt6 eth-rt5 so that zebra does not take
  account linkdown events on this interface.
- Shutting down rt6 eth-rt5 from the switch side

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
bac0d1e606 topotests: isis-tilfa add a switchover test after linkdown
Add a switchover test that consists in shutting down an interface.

Check that the switchover between primary and backup happens before the
SPF re-computation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
d526476184 isisd: avoid fast-reroute from running twice on a down interface event
isis_ifp_down() may in some circumstances be called twice on a down
interface event.

Avoid applying fast-reroute on an already down interface.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:06:05 +02:00
Louis Scalbert
08e4960ab4 isisd: avoid fast-reroute on down adjacency when the interface is down
When an IS-IS interface is coming down, fast-reroute may be triggered
twice: a first time after the detection of the interface down event and
a second time after the detection of the adjacency down (because of the
expiration of the ISIS Hello or BFD timers).

Avoid a BFD down event from running fast-reroute another time if the
interface was already detected down.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-24 10:05:49 +02:00
Donatas Abraitis
41b1d7a3a4 bgpd: Don't increment twice notification sent stats counter
Before:

```
$ vtysh -c 'clear ip bgp 192.168.10.17'
$ vtysh -c 'show bgp neighbor 192.168.10.17 json' | jq '."192.168.10.17".messageStats.notificationsSent'
2
```

After:

```
$ vtysh -c 'clear ip bgp 192.168.10.17'
$ vtysh -c 'show bgp neighbor 192.168.10.17 json' | jq '."192.168.10.17".messageStats.notificationsSent'
1
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 10:20:09 +03:00
Kuldeep Kashyap
fb943df10b tests: [Topojson] Enhance CLI logging
As of now we are logging only JSON output of CLIs
in topotests(topojson) executions and same o/p is
getting printed twice, which is of no use.

Enhanced code to show both plain and JSON output
of CLIs and remove duplicate logging.

It will help in reducing execution logs and in
verification, if sometimes there is mis-match
in CLI plain and JSON outputs.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-05-23 23:34:19 -07:00
Donatas Abraitis
ae872c2f88 bgpd: Add JSON output for show rpki cache-connection
```
spine1-debian-11# sh rpki cache-connection
Connected to group 1
rpki tcp cache 192.168.10.17 8283 pref 1 (connected)
rpki tcp cache 192.168.10.17 8282 pref 2
spine1-debian-11# sh rpki cache-connection json
{
  "connectedGroup":1,
  "connections":[
    {
      "mode":"tcp",
      "host":"192.168.10.17",
      "port":"8283",
      "preference":1,
      "state":"connected"
    },
    {
      "mode":"tcp",
      "host":"192.168.10.17",
      "port":"8282",
      "preference":2,
      "state":"disconnected"
    }
  ]
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 00:06:07 +03:00
Jafar Al-Gharaibeh
778e0cef38 debian, redhat: update changelog for new release
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2022-05-23 14:56:00 -05:00
Donald Sharp
2ca908755c tests: pbr_topo1 sometimes fails under really heavy load
This test is sometimes failing under severe load.  Give some time
for the linux rule installation to actually be registered by the
system before declaring failure.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-23 15:28:46 -04:00
Jafar Al-Gharaibeh
ac425bfc2b
Merge pull request #11150 from opensourcerouting/fix/use_librtr_higher_0.8.0
packaging: Require librtr >= 0.8.0
2022-05-23 11:11:10 -04:00
Donatas Abraitis
3da33b248a github: Add base branch label to every PR to distinguish easily
Faster notice and filter backports by labels per release.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-23 16:58:07 +03:00
Louis Scalbert
62e458278b isisd: apply fast-reroute when an interface falls down
Backup routes are sent to zebra by routing daemons such as isisd so that
the dataplane can pre-install them with a lower priority. When an
interface comes down, the associated primary routes are discarded by the
dataplane and the backup ones take over.

However, some dataplanes (e.g. Netlink ones) do not pre-install the
backup routes. Associated prefixes have no next-hop until SPF is
recomputed.

Apply fast-reroute as soon as an interface falls down by sending route
UPDATEs to zebra.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-23 15:31:34 +02:00
Donatas Abraitis
23706eacc2 doc: Use full URL for FRR keyword highlight
Seems replacement is not working when referenced, only when used directly
in the text |PACKAGE_URL|.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-23 11:47:16 +03:00
Louis Scalbert
a11742dc53 isisd: allow nexthop lookup on interface only
Allow the nexthoplookup function to return the first nexthop found on
ifindex interface if the IP is unspecified.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-23 10:44:50 +02:00
Louis Scalbert
a254fa54e3 isisd: remove previous labels before fast-reroute
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-23 10:44:25 +02:00
Louis Scalbert
7125297323 isisd: apply fast-reroute on an adjacency failure
When a adjacency falls down, the primary routes are not deleted on the
dataplane until the SPF is recomputed. Even the backup routes are
pre-installed on the dataplane, there is no fast-route optimization.

Reasons for an adjacency to come down are:
- BFD down
- Hello timer timeout
- User adjacency clear

Apply the backup route switchover for fast-reroute as soon an IS-IS
adjacency falls down before the first SPF re-computation. Pre-computed
backup routes are applied sooner.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-05-23 10:44:20 +02:00
sarita patra
2ea34a81df pim6d: Don't enable mld on pimreg interface
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-23 01:24:30 -07:00
Donatas Abraitis
4febdb6b9a
Merge pull request #10836 from anlancs/bgpd-mh-delay-esi
zebra: delay setting esi in zebra_evpn_local_es_update()
2022-05-23 07:49:08 +02:00
Donatas Abraitis
972426602a tests: Add Notification support for Graceful-Restart tests
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-22 22:40:22 +03:00
Donald Sharp
a830fc4c79
Merge pull request #11217 from opensourcerouting/fix/doc_overview
doc: Fix FRR/Slack keyword links in overview section
2022-05-22 15:03:05 -04:00
Donald Sharp
6e3b94d9d3
Merge pull request #11238 from opensourcerouting/rtadv-cleanup
zebra: clean up rtadv integration
2022-05-22 15:02:27 -04:00
David Lamparter
7ca9c407ed zebra: clean up rtadv integration
Move a few things into places they actually belong, and reduce the
number of places we have `#ifdev HAVE_RTADV`.  Just overall code
prettification.

... I had actually done this quite a while ago while doing some other
random hacking and thought it more useful to not be sitting on it on my
disk...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-21 14:14:01 +02:00
Jafar Al-Gharaibeh
8eeadd88e9
Merge pull request #11227 from donaldsharp/verify_not_queued
tests: Ensure routes are not queued when calling verify_rib
2022-05-20 16:03:23 -04:00
David Lamparter
9807de3be3
Merge pull request #11223 from donaldsharp/ospf_shenanigans 2022-05-20 18:32:07 +02:00
Donald Sharp
197191a0ce
Merge pull request #11232 from opensourcerouting/bgp-sendhold-derp
bgpd: fix oopsie with SendHoldTime==0
2022-05-20 11:10:04 -04:00
Donald Sharp
006ef829d8 tests: Allow a bit longer for bfd topo tests to synchronize
Allowing only 4 seconds for a bfd test to synchronize is going
to run into problems on extremely loaded systems.  The test
system should value it actually converged over it actually
converged in a reasonable time, especially on test systems
that are loaded because of many multiples of tests running
at the same time.  If it is important to actually test
that something got done by the RFC, the CI system as it
is currently written is not the correct place for this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-20 10:31:48 -04:00
Donald Sharp
cb8018f4c3 tests: Make verify_rib wait up to 40 seconds.
Under heavy load I am seeing verify_rib failing after 12 seconds
but succeeding after 17:

2022-05-19 18:52:54,374 DEBUG: topolog: Exiting lib API: verify_rib
2022-05-19 18:52:54,374 DEBUG: topolog: Function returned True
2022-05-19 18:52:54,374 WARNING: topolog: RETRY DIAGNOSTIC: SUCCEED after FAILED with requested timeout of 12.0s; however, succeeded in 14.7s, investigate timeout timing

There is no reason to not have the test wait a bit longer for very very
heavily loaded systems.  Change the time to 40 seconds.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-20 10:31:48 -04:00
Donald Sharp
6ec742d95f tests: Ensure routes are not queued when calling verify_rib
Lots of tests call verify_rib that takes a list of routes that
need to be verified in some fashion.  This verify_rib functionality
will try up to 12 seconds before failing the check that zebra
has the route and has installed it.

Unfortunately the verify_rib code was not looking to see if
the route was queued for installation and was then allowing
tests to immediately do subsuquent steps that depended on
that route actually being installed sometimes causing tests
to fail.

Write a bit of additional code that looks at the queued
status and allows the test to wait a bit longer for zebra
to finish processing before allowing the test to move on
to the next bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-20 10:31:48 -04:00
Donald Sharp
cfb9e0ee59 lib: Make thread_is_scheduled a static inline
For performance, yo.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-20 09:53:44 -04:00
Donald Sharp
c905f04c7c ospf6d: Clean up thread interface
a) Remove setting of thread pointer to NULL after
thread invocation, this is already done.

b) Use thread_is_scheduled()

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-20 09:52:16 -04:00
Donald Sharp
23b11ab185 ospf6d: Remove double check of default prefix
The ospf6_is_valid_summary_addr function is checking
to see if a prefix is the default and also then double
comparing it against the v6 prefix part.  No need to do this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-20 09:52:16 -04:00
David Lamparter
cbbb1813a6
Merge pull request #11008 from patrasar/sec_addr_list_pimv6 2022-05-20 15:25:52 +02:00
David Lamparter
5a744d5c86
Merge pull request #10903 from SaiGomathiN/pimv6debug 2022-05-20 15:23:31 +02:00
David Lamparter
382268f46a bgpd: fix oopsie with SendHoldTime==0
... *duh*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-20 14:16:24 +02:00
anlan_cs
c331ef1665 zebra: remove one unnecessary check for l3vni nb
The parent node of "vrf"  MUST be non-NULL, so the check is unnecessary and
misleading. Otherwise, there will be a branch of NULL parent node, it makes
no sense, remove it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-05-20 03:11:27 -04:00
Donald Sharp
d37879b7a2
Merge pull request #11225 from opensourcerouting/bgp-sendhold
bgpd: implement SendHoldTimer
2022-05-19 14:51:29 -04:00