bgpd: replay routes for every BGP instance to zebra - #23272
Conversation
Greptile SummaryThe PR restores tenant-VRF BGP routes after zebra reconnects by registering every BGP instance already known to zebra and replaying each instance’s selected FIB-eligible routes.
Confidence Score: 5/5The PR appears safe to merge, with no outstanding correctness or repository-rule violations identified. The reconnect path now iterates only over BGP instances already known to zebra, re-registers each one, and replays its FIB-eligible tables; the tenant-VRF test directly checks route restoration after zebra restarts. The previous host-sysctl finding was manually resolved and the current teardown restores the saved value. Important Files Changed
Sequence DiagramsequenceDiagram
participant B as bgpd
participant Z as zebra
participant K as Kernel FIB
Z->>B: Reconnect
B->>Z: Register BFD client
loop Every BGP instance known to zebra
B->>Z: Register BGP instance
loop Every FIB-eligible AFI/SAFI
B->>Z: Replay selected routes
Z->>K: Reinstall routes
end
end
Reviews (2): Last reviewed commit: "tests: add VRF variant of zebra reconnec..." | Re-trigger Greptile |
0100999 to
536d236
Compare
536d236 to
66dbc21
Compare
66dbc21 to
5ef5952
Compare
|
@greptile review |
|
ci:rerun |
|
Hi @ton31337 , i pushed the changes |
bgp_zebra_connected() replays the selected routes only for the default BGP instance, so routes owned by tenant VRF instances stay in the BGP RIB but are missing from zebra. Replay via bgp_zebra_announce_table() for every BGP instance known to zebra. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
Run ospfd, ripd, isisd and bgpd inside a tenant VRF and verify each daemon replays its VRF-instance routes after a zebra restart. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
5ef5952 to
61a31ac
Compare
|
ci:rerun |
|
changed router-ids to documentation range |
When zebra restarts while bgpd keeps running, routes owned by a tenant
VRF BGP instance stay in the BGP RIB but are missing from zebra and the
kernel FIB. The reconnect replay from #22362 covers the default instance.
Closes: #23271