-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BFD Breaks FRR Reload #6511
Comments
I can confirm the issue... I've hit the exact same problem when testing the FRR gentoo ebuilds recently. Looks like a problem in NOTE: the issue only happened to me in 7.3.1, it works on FRR 7.2.1. |
I just installed FRR 7.2.1 on ubuntu 20.04 and it has the same problem. I haven't found a version where this works for me. |
@rzalamena I think the first problem is in frr-reload.py as you stated, but I think it goes deeper into vtysh not understanding the bfd config structure when parsing with the -m option. Problem 1 appears to be that frr-reload.py is not treating bfd peers as a subcontext of bfd.
the last line should be
Adding "peer" to this conditional fixes that, but I'm not sure if that's the correct fix
Problem 2 seems to be in vtysh as it doesn't add any of the context ending/exit markers for bfd.
vtysh -m is ending after the first bfd peer when it should be exiting the peer only. |
I think I've found where to modify vtysh.c as well. This bit of logic attempts to apply config lines in the order they are written in the config file. If a command produces an error, then the command is retried one level higher in the config hierarchy. This logic is completely unaware of the bfd peer config node.
I'm going to test by adding
|
Reminder: I think it might be worth backporting this, at least to |
Is there anything I can do to assist backporting? A PR or testing? |
add lines starting with 'peer' to the list of sub-contexts that are handled by frr-reload.py. FRRouting#6511 (comment) Signed-off-by: Paul Manley <paul.manley@wholefoods.com> (cherry picked from commit 1c23a0a)
vtysh needs to be aware of how to properly exit a bfd peer when subsequent commands only succeed in a higher context. FRRouting#6511 (comment) Signed-off-by: Paul Manley <paul.manley@wholefoods.com> (cherry picked from commit b727c12)
@mrpaulmanley first of all thank you for your contribution. I opened a PR against the 7.4 stable branch with your changes so we can have it on the next release (probably 7.4.1). If you want to you can test it and give your feedback on the PR. PR: #6737 . |
I have a problem with BFD breaking frr-reload. It's either a bug with how frr-reload parses the BFD node in a saved config, or I just misunderstand how BFD works with integrated config.
I'm running vanilla install of FRR 7.3.1 on 2 instances of Debian 10 that are directly connected. I enabled bgpd and bfdd in the daemons file. If I load the following configs, BFD appears to work by dynamically creating the peers (no BFD node is created in the running-config or frr.conf.) using default timers etc.
router1
router2
But if I add any config for the peer under the BFD node, FRR can't even reload it's own config, saved by issuing a write mem. Say I change the detect multiplier and the issue a write mem. Here is the resulting file written by frr. Notice the section at the end that declares BFD peer with config.
router1 with bfd peer declared
Here is the resulting log from a subsequent frr-reload using this config that FRR wrote.
This results in frr-reload failing. I'm thinking this is a bug with parsing the bfd node in a saved config. vtysh wrote that section and then fails to subsequently reload it.
The text was updated successfully, but these errors were encountered: