[bgp] Use FRR route check instead of kernel ip route in test_bgp_router_id#23351
Open
rustiqly wants to merge 1 commit intosonic-net:masterfrom
Open
[bgp] Use FRR route check instead of kernel ip route in test_bgp_router_id#23351rustiqly wants to merge 1 commit intosonic-net:masterfrom
rustiqly wants to merge 1 commit intosonic-net:masterfrom
Conversation
…er_id On full-scale topologies, the kernel 'ip route show' command returns empty output due to a known issue (sonic-net/sonic-buildimage#24537). This causes check_default_route() to fail with 'Default route not ready' in restart_bgp(). Fix: Add a local helper _check_default_route_via_frr() that uses 'vtysh -c show ip route 0.0.0.0/0' (FRR) instead of kernel ip route, and use it in restart_bgp(). This bypasses the kernel route table limitation on full-scale topologies. Fixes: sonic-net#23168 Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Collaborator
|
/azp run |
Contributor
Author
|
@copilot review |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
CI t1-lag failure is unrelated to this PR — the failing test is /azp run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On full-scale topologies, the kernel
ip route showcommand returns empty output due to a known issue (sonic-net/sonic-buildimage#24537). This causescheck_default_route()(which usesget_ip_route_info→ip route list) to fail with 'Default route not ready' inrestart_bgp().Fix
Add a local helper
_check_default_route_via_frr()that usesvtysh -c 'show ip route 0.0.0.0/0'(FRR) instead of the kernelip routecommand. This bypasses the kernel route table limitation on full-scale topologies while still validating that a default route with a valid nexthop exists.Changes
tests/bgp/test_bgp_router_id.py: Add_check_default_route_via_frr()helper and use it inrestart_bgp()Fixes: #23168