From 1ff27db42f4f8722f8f74967030a4d7e31473731 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Wed, 6 Dec 2023 05:09:54 +0200 Subject: [PATCH] [frr]: Force disable next hop group support. (#17344) Signed-off-by: Nazarii Hnydyn nazariig@nvidia.com Closes #17345 This W/A was proposed by Nvidia FRR team before the long term solution is ready. Why I did it A W/A to fix default route installation during LAG member flap Work item tracking N/A How I did it Disabled FRR next hop group support How to verify it Do LAG member flap --- dockers/docker-fpm-frr/docker_init.sh | 4 ++++ dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 | 2 ++ platform/vs/docker-sonic-vs/frr/zebra.conf | 3 +-- src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf | 2 ++ .../tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf | 2 ++ .../tests/sample_output/py2/t2-chassis-fe-zebra.conf | 2 ++ .../tests/sample_output/py2/zebra_frr.conf | 2 ++ .../tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf | 2 ++ .../tests/sample_output/py3/t2-chassis-fe-zebra.conf | 2 ++ .../tests/sample_output/py3/zebra_frr.conf | 2 ++ 10 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dockers/docker-fpm-frr/docker_init.sh b/dockers/docker-fpm-frr/docker_init.sh index 0ed274ec703f..390a403aa598 100755 --- a/dockers/docker-fpm-frr/docker_init.sh +++ b/dockers/docker-fpm-frr/docker_init.sh @@ -49,6 +49,10 @@ write_default_zebra_config() echo "no fpm use-next-hop-groups" >> $FILE_NAME echo "fpm address 127.0.0.1" >> $FILE_NAME } + + grep -q '^no zebra nexthop kernel enable' $FILE_NAME || { + echo "no zebra nexthop kernel enable" >> $FILE_NAME + } } if [[ ! -z "$NAMESPACE_ID" ]]; then diff --git a/dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 b/dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 index f5a56c316d41..4543ad8f974e 100644 --- a/dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 +++ b/dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2 @@ -7,6 +7,8 @@ {% endblock banner %} ! {% block fpm %} +! Force disable next hop group support +no zebra nexthop kernel enable ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups ! diff --git a/platform/vs/docker-sonic-vs/frr/zebra.conf b/platform/vs/docker-sonic-vs/frr/zebra.conf index 4c994e60def2..1980a6e159f0 100644 --- a/platform/vs/docker-sonic-vs/frr/zebra.conf +++ b/platform/vs/docker-sonic-vs/frr/zebra.conf @@ -1,4 +1,3 @@ +no zebra nexthop kernel enable no fpm use-next-hop-groups - fpm address 127.0.0.1 - diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf index 6b7e1feff000..38db2964823e 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf @@ -4,6 +4,8 @@ ! file: zebra.conf ! ! +! Force disable next hop group support +no zebra nexthop kernel enable ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups ! diff --git a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf index 8bb483456829..120878fe1186 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-vni-zebra.conf @@ -4,6 +4,8 @@ ! file: zebra.conf ! ! +! Force disable next hop group support +no zebra nexthop kernel enable ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups ! diff --git a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-zebra.conf b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-zebra.conf index 402230348a4a..a6e3ad05310f 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-zebra.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/t2-chassis-fe-zebra.conf @@ -4,6 +4,8 @@ ! file: zebra.conf ! ! +! Force disable next hop group support +no zebra nexthop kernel enable ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups ! diff --git a/src/sonic-config-engine/tests/sample_output/py2/zebra_frr.conf b/src/sonic-config-engine/tests/sample_output/py2/zebra_frr.conf index 9d0ab16ee384..9e438caa0e34 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/zebra_frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/zebra_frr.conf @@ -4,6 +4,8 @@ ! file: zebra.conf ! ! +! Force disable next hop group support +no zebra nexthop kernel enable ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups ! diff --git a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf index b55906056616..c6c973f7f05c 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-vni-zebra.conf @@ -4,6 +4,8 @@ ! file: zebra.conf ! ! +! Force disable next hop group support +no zebra nexthop kernel enable ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups ! diff --git a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-zebra.conf b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-zebra.conf index 19e303639a55..84e76ecdb01c 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-zebra.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/t2-chassis-fe-zebra.conf @@ -4,6 +4,8 @@ ! file: zebra.conf ! ! +! Force disable next hop group support +no zebra nexthop kernel enable ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups ! diff --git a/src/sonic-config-engine/tests/sample_output/py3/zebra_frr.conf b/src/sonic-config-engine/tests/sample_output/py3/zebra_frr.conf index a5fb8b1ca104..b8adb98787a7 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/zebra_frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/zebra_frr.conf @@ -4,6 +4,8 @@ ! file: zebra.conf ! ! +! Force disable next hop group support +no zebra nexthop kernel enable ! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages no fpm use-next-hop-groups !