BGP routes getting removed while shutting down the ZAPI connection #14305
-
Hi all, I have an FRR installed on a server with BGP daemon enabled, plus we have an application code that connects to Zebra over ZAPI as BGP client, so whenever the application program restarts the ZAPI connection shutdown and it ended up removing all the BGP routes from the RIB table. Found some code ref to remove the BGP routes when the ZAPI connection shutdown: Line 565 in 497584a Is this the expected behaviour?
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Any idea reading this behaviour @ton31337 & @donaldsharp? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
so if I'm reading this correctly, you're doing a couple of things here that are ... likely to cause problems for you. are you writing your own code that uses the zapi library, and using that code of yours to connect to zebra and claim to be bgpd? a) FRR doesn't support ZAPI as a stable api, and it may change in ways that surprise you from release to release. there are several ways to interact with FRR, with bgp and with zebra. what appears to be happening here isn't really a good approach. |
Beta Was this translation helpful? Give feedback.
-
Basically as Mark is stating you are doing manipulations of the zapi protocol that were never meant to be. We are not going to be spending much time fixing ( or even addressing this type of issue ) since it is outside the scope of how we intend to use zapi |
Beta Was this translation helpful? Give feedback.
so if I'm reading this correctly, you're doing a couple of things here that are ... likely to cause problems for you. are you writing your own code that uses the zapi library, and using that code of yours to connect to zebra and claim to be bgpd?
a) FRR doesn't support ZAPI as a stable api, and it may change in ways that surprise you from release to release.
b) zebra doesn't expect there to be more than one "bgpd" claiming to be bgp protocol, instance 0, and session_id 0. your closing your own process's ZAPI connection is causing zebra to clear out the real bgpd data because your code claims to be bgpd.
there are several ways to interact with FRR, with bgp and with zebra. what appears to …