frr icon indicating copy to clipboard operation
frr copied to clipboard

bgpd routes are not always removed when executing /usr/lib/frr/frrinit.sh stop

Open SvenVD-be opened this issue 3 years ago • 4 comments

  • FRR VERSION frr-7.5-4.el8.x86_64
  • OPERATING SYSTEM VERSION Red Hat Enterprise Linux release 8.5 (Ootpa)
  • KERNEL VERSION 4.18.0-348.2.1.el8_5.x86_64

Describe the bug systemctl stop frr does not always remove bgpd learned routes from kernel

root cause Zebra is still executing its shutdown routine ( removing all routes as instructed by bgpd which got a kill -2 just before ) while it gets a kill -2 himself. Result being zebra not be able to remove all the routes learned from the linux kernel.

To Reproduce Configure zebra and bgpd with peering ( and route-map set table for incoming routes) check ip route show ( table x ) on kernel execute /usr/lib/frr/frrinit.sh stop check ip route show ( table x ) on kernel, bgpd routes still present

Expected behavior Configure zebra and bgpd with peering ( and route-map set table for incoming routes) check ip route show ( table x ) on kernel execute /usr/lib/frr/frrinit.sh stop zebra should finish it's pending working when receiving signal -2 instead of directly aborting everything check ip route show ( table x ) on kernel, bgpd learned routes should be removed

extra info

cat /etc/frr/daemons 
# This file tells the frr package which daemons to start.
#
# Sample configurations for these daemons can be found in
# /usr/share/doc/frr/examples/.
#
# ATTENTION:
#
# When activating a daemon for the first time, a config file, even if it is
# empty, has to be present *and* be owned by the user and group "frr", else
# the daemon will not be started by /etc/init.d/frr. The permissions should
# be u=rw,g=r,o=.
# When using "vtysh" such a config file is also needed. It should be owned by
# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
#
# The watchfrr, zebra and staticd daemons are always started.
#
bgpd=yes
ospfd=no
ospf6d=no
ripd=no
ripngd=no
isisd=no
pimd=no
nhrpd=no
eigrpd=no
sharpd=no
pbrd=no
bfdd=no
fabricd=no
vrrpd=no

#
# If this option is set the /etc/init.d/frr script automatically loads
# the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/frr if you intend to use "vtysh"!
#
vtysh_enable=yes
zebra_options="  -A 127.0.0.1 -s 90000000"
bgpd_options="   -A 127.0.0.1"
ospfd_options="  -A 127.0.0.1"
ospf6d_options=" -A ::1"
ripd_options="   -A 127.0.0.1"
ripngd_options=" -A ::1"
isisd_options="  -A 127.0.0.1"
pimd_options="   -A 127.0.0.1"
nhrpd_options="  -A 127.0.0.1"
eigrpd_options=" -A 127.0.0.1"
sharpd_options=" -A 127.0.0.1"
pbrd_options="   -A 127.0.0.1"
staticd_options="-A 127.0.0.1"
bfdd_options="   -A 127.0.0.1"
fabricd_options="-A 127.0.0.1"
vrrpd_options="  -A 127.0.0.1"

# configuration profile
#
#frr_profile="traditional"
#frr_profile="datacenter"

#
# This is the maximum number of FD's that will be available.
# Upon startup this is read by the control files and ulimit
# is called.  Uncomment and use a reasonable value for your
# setup if you are expecting a large number of peers in
# say BGP.
#MAX_FDS=1024

# The list of daemons to watch is automatically generated by the init script.
#watchfrr_options=""

# To make watchfrr create/join the specified netns, use the following option:
#watchfrr_options="--netns"
# This only has an effect in /etc/frr/<somename>/daemons, and you need to
# start FRR with "/usr/lib/frr/frrinit.sh start <somename>".

# for debugging purposes, you can specify a "wrap" command to start instead
# of starting the daemon directly, e.g. to use valgrind on ospfd:
#   ospfd_wrap="/usr/bin/valgrind"
# or you can use "all_wrap" for all daemons, e.g. to use perf record:
#   all_wrap="/usr/bin/perf record --call-graph -"
# the normal daemon command is added to this at the end.

SvenVD-be avatar Jan 20 '22 14:01 SvenVD-be

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

github-actions[bot] avatar Jul 21 '22 02:07 github-actions[bot]

This issue will be automatically closed in the specified period unless there is further activity.

frrbot[bot] avatar Jul 21 '22 02:07 frrbot[bot]

Any update?

SvenVD-be avatar Jul 25 '22 18:07 SvenVD-be

This issue will no longer be automatically closed.

frrbot[bot] avatar Jul 25 '22 18:07 frrbot[bot]

Please try with the latest version 8.3, or at least 8.2. 7.5 is a very old release, and not kinda maintained anymore.

ton31337 avatar Aug 12 '22 10:08 ton31337

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

github-actions[bot] avatar Feb 09 '23 02:02 github-actions[bot]

This issue will be automatically closed in the specified period unless there is further activity.

frrbot[bot] avatar Feb 09 '23 02:02 frrbot[bot]