Skip to content

frr: validate the BGP RIB for FRR 10 and SONiC - #266

Merged
dhalperi merged 1 commit into
mainfrom
frr-bgp-rib-validation
Nov 22, 2026
Merged

dhalperi merged 1 commit into
mainfrom
frr-bgp-rib-validation

Conversation

@dhalperi

@dhalperi dhalperi commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

FrrValidator now compares the valid best and multipath IPv4 unicast
paths in "show bgp vrf all ipv4 unicast json" with Batfish's BGP RIB:
AS path, origin, MED, local preference, weight, next hop, and eBGP or
iBGP. The FRR parser reads FRR 10's "path" and "metric" keys as well as
the "aspath" and "med" of Cumulus' FRR, and "locPrf". lab_builder now
collects that command on FRR nodes; SONiC already did.

frr_ospf_max_metric_router_lsa predates that collection; a missing
table raises ValidationError, and its sickbay says why.

Cumulus labs are unchanged: they collect "show ip bgp vrf all json" and
keep CumulusFrrValidator. sonic_ebgp passes on Batfish master and loses
its sickbay.

For #42.

dhalperi added a commit that referenced this pull request Nov 21, 2026
Tests what FRR advertises to an eBGP peer in each `neighbor X
remove-private-AS` mode: bare, `all`, `replace-AS` and `all replace-AS`,
on paths of private ASes only and on paths with a public AS, plus
`all replace-AS` with `local-as` and removal of the peer's own AS.

r3 and r4 are sickbayed for #263, #264 and #265.
The BGP RIB comparisons need #266.

For batfish/batfish#10460.
@codecov-commenter

codecov-commenter commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 31.37255% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.33%. Comparing base (dbfe989) to head (bf4545f).

Files with missing lines Patch % Lines
src/lab_validation/validators/FrrValidator.py 23.91% 35 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #266      +/-   ##
==========================================
- Coverage   82.91%   82.33%   -0.59%     
==========================================
  Files          97       97              
  Lines        4536     4585      +49     
==========================================
+ Hits         3761     3775      +14     
- Misses        775      810      +35     
Flag Coverage Δ
unittests 82.33% <31.37%> (-0.59%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dhalperi
dhalperi enabled auto-merge (squash) November 21, 2026 23:33
FrrValidator now compares the valid best and multipath IPv4 unicast
paths in "show bgp vrf all ipv4 unicast json" with Batfish's BGP RIB:
AS path, origin, MED, local preference, weight, next hop, and eBGP or
iBGP. The FRR parser reads FRR 10's "path" and "metric" keys as well as
the "aspath" and "med" of Cumulus' FRR, and "locPrf". lab_builder now
collects that command on FRR nodes; SONiC already did.

frr_ospf_max_metric_router_lsa predates that collection; a missing
table raises ValidationError, and its sickbay says why.

Cumulus labs are unchanged: they collect "show ip bgp vrf all json" and
keep CumulusFrrValidator. sonic_ebgp passes on Batfish master and loses
its sickbay.

For #42.
@dhalperi
dhalperi force-pushed the frr-bgp-rib-validation branch from bd59079 to bf4545f Compare November 21, 2026 23:42
@dhalperi
dhalperi disabled auto-merge November 21, 2026 23:51
@dhalperi
dhalperi enabled auto-merge (squash) November 21, 2026 23:51
@dhalperi
dhalperi merged commit d55bbaf into main Nov 22, 2026
156 checks passed
@dhalperi
dhalperi deleted the frr-bgp-rib-validation branch November 22, 2026 00:09
dhalperi added a commit that referenced this pull request Nov 22, 2026
Tests what FRR advertises to an eBGP peer in each `neighbor X
remove-private-AS` mode: bare, `all`, `replace-AS` and `all replace-AS`,
on paths of private ASes only and on paths with a public AS, plus
`all replace-AS` with `local-as` and removal of the peer's own AS.

r3 and r4 are sickbayed for #263, #264 and #265.
The BGP RIB comparisons need #266.

For batfish/batfish#10460.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants