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).
| 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...
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 |
Why on earth would we test every device against an FRR bug that has already been fixed? Nope. |
Because it’s a quick minimal test that checks whether BFD actually works as intended. If there's a way to only run it if dut is FRR then we could add that if you prefer. I think it might be useful |
It's not our job to check whether implementations "work as intended". We have to do our best to configure them correctly.
If you feel like creating a test suite for FRR, please go ahead. However, although I report everything we find to my FRR contacts, that's not the job of netlab integration tests. |
|
I have updated my part, anything else required? |
My mental energy to review it 🤔 The code looks OK, but... As I already explained, in the test we want to check whether the tested device (DUT) starts BFD over BGP session. If DUT has BFD configured, but not enabled on the neighbor, and the probe starts a BFD session for its BGP neighbor, the test might succeed (the probe device is happy that it has a BFD session). There's a reason I made the test as convoluted as it looks to you. The changes to the integration test are thus moot. Tangentially, you can never make any custom changes to the tested device or execute any testing logic on it, or we'd have to implement them for every device we want to test; clearly something that we will NOT do. Regardless, let's assume we want to add BFD checking functionality to "bgp_neighbor_details" even though it will not be used in the integration test. In that case, it would be nice to have the three-state behavior I mentioned in the initial review:
I can easily add the three-state logic and merge the code, but it will remain unused functionality from the integration test perspective. On a tangential note, we never documented the plugin functions, so even if someone wants to use this, they'd have to dig into the source code to discover it exists. |
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.