FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.31k stars 1.25k forks source link

Missing route map error during startup for existing route-map #17052

Open SRv6d opened 5 days ago

SRv6d commented 5 days ago

Description

When starting the FRRouting systemd service, errors are logged for missing route maps, even though they are configured and show up at runtime.

Version

FRRouting 10.1.1 on Linux(5.14.0-427.18.1.el9_4.x86_64).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
    '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sbindir=/usr/lib/frr' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-static' '--disable-werror' '--enable-multipath=256' '--enable-vtysh' '--enable-ospfclient' '--enable-ospfapi' '--enable-rtadv' '--enable-ldpd' '--enable-pimd' '--enable-pim6d' '--enable-pbrd' '--enable-nhrpd' '--enable-eigrpd' '--enable-babeld' '--enable-vrrpd' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-fpm' '--enable-watchfrr' '--disable-bgp-vnc' '--enable-isisd' '--enable-rpki' '--enable-bfdd' '--enable-pathd' '--enable-snmp' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' 'CC=gcc' 'CXX=g++' 'LT_SYS_LIBRARY_PATH=/usr/lib64:'

How to reproduce

Start FRR installed on Rocky Linux 9.4 through the stable repos using systemd and the following configurations:

$ pwd
/etc/frr

$ ls -l
total 12
-rwxr-xr-x. 1 root root  647 Oct  8 08:54 daemons
-rwxr-xr-x. 1 root root 1450 Oct 10 08:49 frr.conf
-rwxr-xr-x. 1 root root   32 Oct  9 15:21 vtysh.conf

$ cat daemons
vtysh_enable=yes

zebra=yes
zebra_options="-A 127.0.0.1 -s 90000000"

bgpd=yes
bgpd_options="-A 127.0.0.1"

bfdd=yes
bfdd_options="-A 127.0.0.1"

isisd=no
isisd_options="-A 127.0.0.1"

ldpd=no
ldpd_options="-A 127.0.0.1"

nhrpd=no
nhrpd_options="-A 127.0.0.1"

ospfd=no
ospfd_options="-A 127.0.0.1"

ospf6d=no
ospf6d_options="-A ::1"

pimd=no
pimd_options="-A 127.0.0.1"

ripd=no
ripd_options="-A 127.0.0.1"

ripngd=no
ripngd_options="-A ::1"

staticd=no
staticd_options="-A 127.0.0.1"

eigrpd=no
eigrpd_options="-A 127.0.0.1"

babeld=no
babeld_options="-A 127.0.0.1"

sharpd=no
sharpd_options="-A 127.0.0.1"

pbrd=no
pbrd_options="-A 127.0.0.1"

$ cat frr.conf
frr version 10.1.1
frr defaults datacenter
hostname test
service integrated-vtysh-config
!
ip prefix-list default_v4 seq 05 permit 0.0.0.0/0
ip prefix-list vm_prefixes_v4 seq 05 permit 198.51.100.0/24 ge 32 le 32
!
ipv6 prefix-list default_v6 seq 05 permit ::/0
ipv6 prefix-list vm_prefixes_v6 seq 05 permit 2001:db8::/32 ge 128 le 128
!
interface eth0
 no ipv6 nd suppress-ra
exit
!
interface eth1
 no ipv6 nd suppress-ra
exit
!
router bgp 4200000011
 bgp router-id 7.7.7.7
 neighbor fabric peer-group
 neighbor fabric remote-as external
 neighbor fabric description Network Fabric
 neighbor eth0 interface peer-group fabric
 neighbor eth1 interface peer-group fabric
 !
 address-family ipv4 unicast
  redistribute static
  neighbor fabric next-hop-self
  neighbor fabric soft-reconfiguration inbound
  neighbor fabric route-map FABRIC_IN in
  neighbor fabric route-map FABRIC_OUT out
 exit-address-family
 !
 address-family ipv6 unicast
  redistribute static
  neighbor fabric activate
  neighbor fabric next-hop-self
  neighbor fabric soft-reconfiguration inbound
  neighbor fabric route-map FABRIC_IN in
  neighbor fabric route-map FABRIC_OUT out
 exit-address-family
exit
!
route-map FABRIC_IN permit 05
 match ip address prefix-list default_v4
 match ipv6 address prefix-list default_v6
exit
!
route-map FABRIC_OUT permit 05
 match ip address prefix-list vm_prefixes_v4
 match ipv6 address prefix-list vm_prefixes_v6
exit
end

$ cat vtysh.conf
service integrated-vtysh-config

Expected behavior

No missing route map errors for configured route maps.

Actual behavior

This is logged:

Oct 10 08:49:19 test frrinit.sh[24479]: The route-map 'FABRIC_IN' does not exist.
Oct 10 08:49:19 test frrinit.sh[24479]: The route-map 'FABRIC_OUT' does not exist.

While vtysh shows them as configured:

$ vtysh -c "show route-map FABRIC_IN"
ZEBRA:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
    ip address prefix-list default_v4
  Set clauses:
  Call clause:
  Action:
    Exit routemap
RIP:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
    ip address prefix-list default_v4
  Set clauses:
  Call clause:
  Action:
    Exit routemap
RIPNG:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
  Set clauses:
  Call clause:
  Action:
    Exit routemap
OSPF:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
    ip address prefix-list default_v4
  Set clauses:
  Call clause:
  Action:
    Exit routemap
OSPF6:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
  Set clauses:
  Call clause:
  Action:
    Exit routemap
BGP:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
    ip address prefix-list default_v4
  Set clauses:
  Call clause:
  Action:
    Exit routemap
ISIS:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
    ip address prefix-list default_v4
  Set clauses:
  Call clause:
  Action:
    Exit routemap
PIM:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
  Set clauses:
  Call clause:
  Action:
    Exit routemap
EIGRP:
route-map: FABRIC_IN Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 5 Invoked 0
  Match clauses:
  Set clauses:
  Call clause:
  Action:
    Exit routemap

Additional context

Full startup log:

Oct 10 09:34:05 test systemd[1]: Starting FRRouting...
Oct 10 09:34:05 test frrinit.sh[26577]: Starting watchfrr with command: '  /usr/lib/frr/watchfrr  -d  -F traditional   zebra mgmtd bgpd staticd bfdd'
Oct 10 09:34:05 test watchfrr[26582]: [T83RR-8SM5G] watchfrr 10.1.1 starting: vty@0
Oct 10 09:34:05 test watchfrr[26582]: [ZCJ3S-SPH5S] zebra state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26582]: [ZCJ3S-SPH5S] mgmtd state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26582]: [ZCJ3S-SPH5S] bgpd state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26582]: [ZCJ3S-SPH5S] staticd state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26582]: [ZCJ3S-SPH5S] bfdd state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26582]: [YFT0P-5Q5YX] Forked background command [pid 26583]: /usr/lib/frr/watchfrr.sh restart all
Oct 10 09:34:05 test watchfrr[26583]: [ZCJ3S-SPH5S] zebra state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26583]: [ZCJ3S-SPH5S] mgmtd state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26583]: [ZCJ3S-SPH5S] bgpd state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26583]: [ZCJ3S-SPH5S] staticd state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26583]: [ZCJ3S-SPH5S] bfdd state -> down : initial connection attempt failed
Oct 10 09:34:05 test watchfrr[26583]: [X9M5M-0DNSV] setpgid(0,0) failed: Permission denied
Oct 10 09:34:05 test frrinit.sh[26593]: 2024/10/10 09:34:05 ZEBRA: [NNACN-54BDA][EC 4043309110] Disabling MPLS support (no kernel support)
Oct 10 09:34:05 test frrinit.sh[26613]: [26613|mgmtd] sending configuration
Oct 10 09:34:05 test frrinit.sh[26614]: [26614|zebra] sending configuration
Oct 10 09:34:05 test frrinit.sh[26620]: [26620|bgpd] sending configuration
Oct 10 09:34:05 test frrinit.sh[26612]: Waiting for children to finish applying config...
Oct 10 09:34:05 test frrinit.sh[26614]: [26614|zebra] done
Oct 10 09:34:05 test frrinit.sh[26628]: [26628|watchfrr] sending configuration
Oct 10 09:34:05 test frrinit.sh[26630]: [26630|staticd] sending configuration
Oct 10 09:34:05 test frrinit.sh[26631]: [26631|bfdd] sending configuration
Oct 10 09:34:05 test frrinit.sh[26613]: [26613|mgmtd] done
Oct 10 09:34:05 test frrinit.sh[26630]: [26630|staticd] done
Oct 10 09:34:05 test watchfrr[26582]: [VTVCM-Y2NW3] Configuration Read in Took: 00:00:00
Oct 10 09:34:05 test frrinit.sh[26628]: [26628|watchfrr] done
Oct 10 09:34:05 test frrinit.sh[26620]: The route-map 'FABRIC_IN' does not exist.
Oct 10 09:34:05 test frrinit.sh[26620]: The route-map 'FABRIC_OUT' does not exist.
Oct 10 09:34:05 test frrinit.sh[26631]: [26631|bfdd] done
Oct 10 09:34:05 test frrinit.sh[26620]: The route-map 'FABRIC_IN' does not exist.
Oct 10 09:34:05 test frrinit.sh[26620]: The route-map 'FABRIC_OUT' does not exist.
Oct 10 09:34:05 test frrinit.sh[26620]: [26620|bgpd] done
Oct 10 09:34:05 test watchfrr[26582]: [QDG3Y-BY5TN] zebra state -> up : connect succeeded
Oct 10 09:34:05 test watchfrr[26582]: [QDG3Y-BY5TN] mgmtd state -> up : connect succeeded
Oct 10 09:34:05 test watchfrr[26582]: [QDG3Y-BY5TN] bgpd state -> up : connect succeeded
Oct 10 09:34:05 test watchfrr[26582]: [QDG3Y-BY5TN] staticd state -> up : connect succeeded
Oct 10 09:34:05 test watchfrr[26582]: [QDG3Y-BY5TN] bfdd state -> up : connect succeeded
Oct 10 09:34:05 test watchfrr[26582]: [KWE5Q-QNGFC] all daemons up, doing startup-complete notify
Oct 10 09:34:05 test frrinit.sh[26577]: Started watchfrr
Oct 10 09:34:05 test systemd[1]: Started FRRouting.

Checklist

ton31337 commented 5 days ago

You can ignore it (nothing broken functionally). This is because the BGP config is applied first, and route maps - afterward.

SRv6d commented 5 days ago

@ton31337 So this is a "good" error? Is there any documentation of "good" errors that are meant to be ignored? How is an incorrect error not functionally broken?

ton31337 commented 5 days ago

It's not an error, it's a warning.

How is an incorrect error not functionally broken?

Because the sessions are established only after the configuration parsing is done.

SRv6d commented 5 days ago

I do find it unfortunate that issues are closed as completed, with the "solution" being to ignore the problem. It doesn't exactly create much confidence in the project.

ton31337 commented 4 days ago

@SRv6d are you able to test/verify this .rpm? From here: https://ci1.netdef.org/browse/FRR-PULLREQ3-5409/artifact/shared/RedHat-9-x86_64-RPMs/.

SRv6d commented 4 days ago

watchfrr fails to start, I get the following: /usr/lib/frr/watchfrr: symbol lookup error: /lib64/libfrr.so.0: undefined symbol: ly_strvecode.

I installed frr-10.3_dev_20241010_git.7b18afb-01.el9.x86_64.rpm, frr-pythontools-10.3_dev_20241010_git.7b18afb-01.el9.x86_64.rpm as well as frr-contrib-10.3_dev_20241010_git.7b18afb-01.el9.x86_64.rpm. Am I missing some?

ton31337 commented 4 days ago

What is the libyang version?

SRv6d commented 4 days ago

libyang version 2.0.7-2.el9

ton31337 commented 4 days ago

You have to use 2.1.128 (this is the recommended/required version for newer releases). Please upgrade.

SRv6d commented 4 days ago

This version is from frr-10.3_dev_20241010_git.7b18afb-01.el9.x86_64.rpm included in the RPM directory you sent. How do I install the correct version separately?

ton31337 commented 4 days ago

libyang package is here for RHEL9: https://ci1.netdef.org/browse/LIBYANG-LIBYANG21-13/artifact/shared/RedHat-9-x86_64-Packages.

SRv6d commented 23 hours ago

That was it, no more error during startup, thank you.