Skip to content
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/zebra error messages for routes from kernel default table #12753

Closed
Stephenxf opened this issue Nov 18, 2022 · 2 comments
Closed

FRR/zebra error messages for routes from kernel default table #12753

Stephenxf opened this issue Nov 18, 2022 · 2 comments
Assignees
Labels
MSFT Triaged this issue has been triaged

Comments

@Stephenxf
Copy link
Contributor

Description

With the patch from #12018, the routes from kernel default table are ignored in function netlink_route_info_fill(). However, this change also introduces unwanted error messages with this sequence of function calls from FRR:

zfpm_build_route_updates() -> zfpm_encode_route() -> zfpm_netlink_encode_route() -> netlink_route_info_fill()

As netlink_route_info_fill() returns 0 for routes from default table, zfpm_build_route_updates() will throw out error messages, for instance, as follows:

Nov  9 23:08:05.996495 falco-test-dut01 DEBUG bgp#zebra[29]: FPM: netlink_route_info_fill: Discard default table route
Nov  9 23:08:05.996495 falco-test-dut01 ERR bgp#zebra[29]: zfpm_build_route_updates: Encoding Prefix: 0.0.0.0/0 No valid nexthops
Nov  9 23:08:05.996495 falco-test-dut01 DEBUG bgp#zebra[29]: FPM: netlink_route_info_fill: Discard default table route
Nov  9 23:08:05.996495 falco-test-dut01 ERR bgp#zebra[29]: zfpm_build_route_updates: Encoding Prefix: 172.21.47.0/24 No valid nexthops
Nov  9 23:08:05.997066 falco-test-dut01 DEBUG bgp#zebra[29]: FPM: netlink_route_info_fill: Discard default table route
Nov  9 23:08:05.997066 falco-test-dut01 ERR bgp#zebra[29]: zfpm_build_route_updates: Encoding Prefix: ::/0 No valid nexthops
Nov  9 23:08:05.997066 falco-test-dut01 DEBUG bgp#zebra[29]: FPM: netlink_route_info_fill: Discard default table route
Nov  9 23:08:05.997066 falco-test-dut01 ERR bgp#zebra[29]: zfpm_build_route_updates: Encoding Prefix: fc00:2::/64 No valid nexthops

While these error messages are harmless functionally, they may cause one or more test failures. In our sanity, the test case ipfwd/test_nhop_count.py fails because the operation from the test case triggers the above call flow and then loganalyzer complains about the errors.

LogAnalyzerError: {'match_messages': {'/tmp/syslog.falco-test-dut01.2022-11-11-17:41:17': ['Nov 11 17:45:29.940308 falco-test-dut01 ERR bgp#zebra[35]: zfpm_build_route_updates: Encoding Prefix: 0.0.0.0/0 No valid nexthops\n', 'Nov 11 17:45:29.940875 falco-test-dut01 ERR bgp#zebra[35]: zfpm_build_route_updates: Encoding Prefix: 172.21.47.0/24 No valid nexthops\n', 'Nov 11 17:45:29.941207 falco-test-dut01 ERR bgp#zebra[35]: zfpm_build_route_updates: Encoding Prefix: ::/0 No valid nexthops\n', 'Nov 11 17:45:29.941535 falco-test-dut01 ERR bgp#zebra[35]: zfpm_build_route_updates: Encoding Prefix: fc00:2::/64 No valid nexthops\n']}, 'total': {'expected_match': 0, 'expected_missing_match': 0, 'match': 4}, 'match_files': {'/tmp/syslog.falco-test-dut01.2022-11-11-17:41:17': {'expected_match': 0, 'match': 4}}, 'expect_messages': {'/tmp/syslog.falco-test-dut01.2022-11-11-17:41:17': []}, 'unused_expected_regexp': []}

Steps to reproduce the issue:

  1. Make sure there are routes in kernel table default, e.g., 0.0.0.0/0 or eth0 prefix.
  2. Flap an active interface, which will trigger the above mentioned call flow.
  3. Check FRR logs for the error messages.

Describe the results you received:

FRR/zebra error messages as shown above.

Describe the results you expected:

No FRR/zebra error messages.

Additional information you deem important (e.g. issue happens only occasionally):

Our SONiC code is based off 202012, but the FRR code here is same as the latest.

@azure-pipelines-wrapper
Copy link

Thanks for opening this issue!

@judyjoseph judyjoseph added the Triaged this issue has been triaged label Nov 23, 2022
yxieca pushed a commit that referenced this issue Dec 8, 2022
…12912)

Why I did it
As described in detail in #12753, the current FRR patch 0009-ignore-route-from-default-table.patch is causing unwanted FRR/zebra error logs. This change gets rid of the error messages for routes from kernel default table while these routes are ignored in prefix encoding.

How I did it
This fix updates the original 0009 patch by checking if the routes are from table default before printing the error logs. The original patch checks the same condition and ignores the routes from table default in prefix encoding.

How to verify it
Follow the steps to repro as described in #12753.
Also verify the test case ipfwd/test_nhop_count.py no longer fails due to the error messages.

Signed-off-by: Stephen Xu <[email protected]>
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this issue Dec 8, 2022
…onic-net#12912)

Why I did it
As described in detail in sonic-net#12753, the current FRR patch 0009-ignore-route-from-default-table.patch is causing unwanted FRR/zebra error logs. This change gets rid of the error messages for routes from kernel default table while these routes are ignored in prefix encoding.

How I did it
This fix updates the original 0009 patch by checking if the routes are from table default before printing the error logs. The original patch checks the same condition and ignores the routes from table default in prefix encoding.

How to verify it
Follow the steps to repro as described in sonic-net#12753.
Also verify the test case ipfwd/test_nhop_count.py no longer fails due to the error messages.

Signed-off-by: Stephen Xu <[email protected]>
@theasianpianist
Copy link
Contributor

Fixed by #12912

theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this issue Jan 18, 2023
…onic-net#12912)

Why I did it
As described in detail in sonic-net#12753, the current FRR patch 0009-ignore-route-from-default-table.patch is causing unwanted FRR/zebra error logs. This change gets rid of the error messages for routes from kernel default table while these routes are ignored in prefix encoding.

How I did it
This fix updates the original 0009 patch by checking if the routes are from table default before printing the error logs. The original patch checks the same condition and ignores the routes from table default in prefix encoding.

How to verify it
Follow the steps to repro as described in sonic-net#12753.
Also verify the test case ipfwd/test_nhop_count.py no longer fails due to the error messages.

Signed-off-by: Stephen Xu <[email protected]>
qiluo-msft pushed a commit that referenced this issue Jan 25, 2023
…12912) (#13423)

…(#12912)

Why I did it
As described in detail in #12753, the current FRR patch 0009-ignore-route-from-default-table.patch is causing unwanted FRR/zebra error logs. This change gets rid of the error messages for routes from kernel default table while these routes are ignored in prefix encoding.

How I did it
This fix updates the original 0009 patch by checking if the routes are from table default before printing the error logs. The original patch checks the same condition and ignores the routes from table default in prefix encoding.

How to verify it
Follow the steps to repro as described in #12753.
Also verify the test case ipfwd/test_nhop_count.py no longer fails due to the error messages.

#### Why I did it
Resolve cherry-pick conflict for #12912
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MSFT Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

3 participants