Add Validation functions BGP BFD for FRR/EOS#3534
Conversation
ipspace
left a comment
There was a problem hiding this comment.
While I'm perfectly fine with checking BFD status with a plugin, I'm wondering whether we need this as the integration test checks whether the tested device starts BFD, so we cannot configure BFD-for-BGP, so we won't get BFD info in the BGP neighbor anyway.
Having said that, it would be nice to have BFD-with-BGP checking functionality, but I think the parameter has to be be three-state: None (not interested in BFD), False (BFD must NOT be running) and True (BFD MUST be running).
|
|
||
| return f'Neighbor {n_addr} ({n_id}) is in state {data[n_addr].peerState}' | ||
|
|
||
| def show_bgp_neighbor_details(ngb: list, n_id: str, af: str='ipv4', *, activate: str = '', bfd: bool = False, **kwargs: typing.Any) -> str: |
There was a problem hiding this comment.
No need to specify BFD parameter in the "show" call which only generates the command to execute. kwargs will take care of that.
|
|
||
| result = f'The neighbor {n_addr} ({n_id}){act_err} is in BFD state {found.bfdState}' | ||
| if not found.bfdState == 3: | ||
| raise Exception(f'{result} ( expected 3 - Up )') |
There was a problem hiding this comment.
Nit: no need for spaces within brackets ;)
| return f'Neighbor {n_addr} ({n_id}) is in state {data[n_addr].state}' | ||
|
|
||
| def show_bgp_neighbor_details(ngb: list, n_id: str, af: str = 'ipv4', **kwargs: typing.Any) -> str: | ||
| def show_bgp_neighbor_details(ngb: list, n_id: str, af: str = 'ipv4', bfd: bool = False, **kwargs: typing.Any) -> str: |
There was a problem hiding this comment.
As before, no need for bfd parameter; kwargs will take it.
| if data.peerBfdInfo.status != "Up": | ||
| raise Exception(f'{k} expected value UP actual {data.peerBfdInfo.status}') | ||
| else: | ||
| raise Exception(f'Neighbor data structure does not contain attribute peerBfdInfo') |
There was a problem hiding this comment.
I would reword this along the lines of "No BFD information for BGP peer {n_id}"
| nodes: | ||
| dut: | ||
| bgp.as: 65000 | ||
| bgp.bfd: True |
There was a problem hiding this comment.
Wrong. You see, the point is that DUT runs BFD with one peer but not the other.
There was a problem hiding this comment.
There is only 1 peer in the bgp.session version of this BFD test topology currently...
| groups: | ||
| probes: | ||
| device: eos | ||
| device: frr |
There was a problem hiding this comment.
We probably need EOS here. See below...
| x1: | ||
| bgp.as: 65100 | ||
| config: [ static_bfd ] | ||
| bgp.bfd: True |
There was a problem hiding this comment.
IIRC, the reason for this tweak (we could easily configure BFD on X1) is to ensure that X1 is willing to run BFD with DUT (it has a BFD neighbor configured), but will not try to initiate it (so we know DUT has to actively run BFD for BGP neighbors).
| frr: >- | ||
| result[0].status == "up" | ||
|
|
||
| bfd_v4_dut: |
There was a problem hiding this comment.
You cannot check anything on the tested device. It can be any one of the 20 or so platforms we support.
There was a problem hiding this comment.
No problems, the test from the DUT was left over, as i wanted to test both at once rather than having re up/down the environment to swap.
Cover the FRR default-timer regression by forcing BFD down and documenting how to reproduce it with FRR 10.5.1. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Took the liberty to add a test for FRRouting/frr#22097 |
Made the validation plugin be able to take BFD information similar to the OSPF one.
Works with both EOS and FRR.
Not entirely sure if is correct how I made change to the DUT with enabling BFD in the topology.