-
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
FRR 7 on Debian Stretch not loading route-map "set src <address>" entries at first startup #4249
Comments
Okay, so this is weird.... I Maybe there's a race condition where these two timers are keeping lo from coming up, and FRR doesn't load that line of the config because that address doesn't exist on the system yet?? But that doesn't make any sense, apt-daily-* shouldn't be affecting networking... I'd think. EDIT - it only works on the vm I setup to repro this problem. Back on the lab system this doesn't work. |
I agree that apt timers should not affect this at all. You say you can reliably recreate it; does |
Both Although that's still a WAG, and I'm not seeing any errors in the logs below (in fact, it looks like frr finds the /32 on lo before the /29 on ens18) I added these lines to
And added these launch options to zebra in And in But I didn't see anything too interesting in any of the output. I'm going to try it on the R900 with the same debugging options, and I'll keep rebooting that vm until I get a boot where it does load, and then compare those logs. EDIT - looking closer at debug.log, I see this:
Not sure what to make of it. Looks like frr sees the config entry and passes it off somewhere else to be applied? I don't know much about how the guts of frr work. EDIT 2 - I see in zebra/zebra_routemap.c#L626 that the |
Update - If I switch from ifupdown2 to the classic ifupdown, it works just fine every time.
Here's some logs: I then reinstalled ifupdown2 and rebooted with that same /e/n/i syntax for lo, and no toast. Still thinking it's a race condition of some sort, I started looking closer at the systemd unit files for ifupdown, ifupdown2, and both frr version 6.0.2 and 7.0. Classic ifupdown and ifupdown2 have some pretty big differences in their dependency trees:
And between frr 6.0.2 and 7.0 we had this change:
If I replace the 7.0 unit file with the 6.0.2 unit file, then it starts working just fine with ifupdown2, every time. Working boot with ifupdown2 and 6.0.2 unit file - frr debug log |
'set src' command just checks for local address available on the system. some improvement needs to be done on that command. |
When we went into production with FRR-7 we ended up doing this:
This works fine in our environment but I'm sure there's use cases out there where you'd want frr to come up before ifupdown/ifupdown2, so this isn't anything more than a bandaid. |
I have a very similar problem. with classic ifupdown. For IPv4 and IPv6 as well. set src does not come back after a reboot. |
@kooky is this with 7.1 or 7.3? Kernel 4.x or 5.x? |
@epers I'm on frr 7.2 with kernel 4.19.0-9 (Debian buster) I'll test the making systemd bring up the network interfaces come up before frr. (Can't upgrade to 7.3 because of a ospf6 problem.) |
Include an IPv6 example for set src And a note that the IP address has to exist. This is to try and make people aware to avoid things like issue FRRouting#4249 FRRouting#4249 Signed-off-by: Tim Bray <[email protected]>
This problem is fixed is the latest git and also in 7.3.1. after a some testing: |
This would be broken on any kernel with nexthop objects functionality (>
5.3) and only FRR version 7.3
…On Tue, May 12, 2020 at 11:29 AM Tim Bray ***@***.***> wrote:
@epers <https://github.com/epers>
@kooky <https://github.com/kooky> is this with 7.1 or 7.3? Kernel 4.x or
5.x?
We've run into a (probably) unrelated problem where frr 7.3 + kernel 5.x
will not apply set src even when the address exists before frr starts.
This problem is fixed is the latest git and also in 7.3.1.
after a some testing:
Frr 7.3 with linux kernel 5.4.11 (or newer) is broken for set src. (I
tested with linux 5.6.12, 5.4.11, 5.2.13, 4.19)
on slack, @sworleys <https://github.com/sworleys> identified that the fix
is in
e85c67d
<e85c67d>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4249 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVUB6E3G4AW7JYQ6QB323TRRFTONANCNFSM4HKTSIYQ>
.
|
Include an IPv6 example for set src And a note that the IP address has to exist. This is to try and make people aware to avoid things like issue FRRouting#4249 FRRouting#4249 Signed-off-by: Tim Bray <[email protected]>
@polychaeta autoclose in 1 day. |
Oh cool, thank you! |
1. This check is absolutely useless. Nothing keeps user from deleting the address right after this check. 2. This check prevents zebra from correctly reading the user config with "set src" because of a race with interface startup (see FRRouting#4249). 3. NO OPERATIONAL DATA USAGE ON VALIDATION STAGE. Fixes FRRouting#7319. Signed-off-by: Igor Ryzhov <[email protected]>
1. This check is absolutely useless. Nothing keeps user from deleting the address right after this check. 2. This check prevents zebra from correctly reading the user config with "set src" because of a race with interface startup (see FRRouting#4249). 3. NO OPERATIONAL DATA USAGE ON VALIDATION STAGE. Fixes FRRouting#7319. Signed-off-by: Igor Ryzhov <[email protected]>
1. This check is absolutely useless. Nothing keeps user from deleting the address right after this check. 2. This check prevents zebra from correctly reading the user config with "set src" because of a race with interface startup (see #4249). 3. NO OPERATIONAL DATA USAGE ON VALIDATION STAGE. Fixes #7319. Signed-off-by: Igor Ryzhov <[email protected]> (cherry picked from commit 1f74d96)
[x] Did you check if this is a duplicate issue?
[ ] Did you test it on the latest FRRouting/frr master branch?
To Reproduce
deb https://deb.frrouting.org/frr stretch frr-7
repo andsystemctl enable frr
set src <some local address>
directiveset src
directive was not loadedsystemctl restart frr
and check running-config again, theset src
directive will be loaded this timeExpected behavior
The
set src
directive to be loaded at bootVersions
Linux frr7-test 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux
Additional context
We're using the
set src
directive of a route-map to set the source address of ospf-learned routes to the loopback address.When frr is first started at boot, it's not loading this
set src
route-map entry that is defined in/etc/frr/frr.conf
If I
systemctl restart frr
after logging in, then these entries are loaded and applied correctly.If I
systemctl disable frr
, and then manuallysystemctl start frr
after boot is complete and I log in, it works properly.Other route-map entries (such as
match ip address 1
to tie the route-map to an access-list) seem to work properly.route-map created, system rebooted:
First let's look at the FRR configuration file:
And now let's check running-config as loaded at boot:
Now let's restart frr and look at the running config again:
Further reboots of the system show the same behavior - the
set src
entry isn't loaded when FRR is started at boot, but it comes back as expected if FRR is restarted.And here's /e/n/i, just for more context (using ifupdown2):
Let me know if I can provide any other logs or do any other testing.
As a workaround for now, I've created a systemd timer that restarts frr one minute after
multi-user.target
is reached.The text was updated successfully, but these errors were encountered: