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

[bgpcfgd] Couldn't configure a Static Route without BGP_ASN field #8027

Closed
vivekrnv opened this issue Jun 30, 2021 · 0 comments · Fixed by #8037
Closed

[bgpcfgd] Couldn't configure a Static Route without BGP_ASN field #8027

vivekrnv opened this issue Jun 30, 2021 · 0 comments · Fixed by #8037
Assignees

Comments

@vivekrnv
Copy link
Contributor

Description

Configuring a Static Route fails when there is no ASN field in the DEVICE_METADATA table of Config DB.
Just for configuring a Static Route, a BGP_ASN shouldn't have been required

Steps to reproduce the issue:

admin@sonic:~$ <Remove ASN field from the Device Metadata>
admin@sonic:~$ sudo config route add prefix 20.0.0.0/24 nexthop 30.0.0.2
admin@sonic:~$ show ip route 20.0.0.0/24
% Network not in table

admin@sonic:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

S>* 0.0.0.0/0 [200/0] via 10.210.24.1, eth0, weight 1, 00:10:58
C>* 10.210.24.0/22 is directly connected, eth0, 00:11:00
<Static Route Entry is written to CONFIG_DB but not applied>

The StaticRouteMgr throws the corresponding log.
Jun 30 03:10:15.313990 sonic DEBUG bgp#bgpcfgd: Not all dependencies are met for the Manager: <class 'bgpcfgd.managers_static_rt.StaticRouteMgr'>

Describe the results you received:

Couldn't configure Static Route

Describe the results you expected:

Output of show version:

This can be seen with the versions built with these changes

7233
1534

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

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

shi-su added a commit that referenced this issue Jul 9, 2021
Why I did it
Static route configuration should not depend on BGP_ASN. Remove the dependency on BGP_ASN for StaticRouteMgr.
Fix #8027

How I did it
Check if BGP_ASN field before configuring static route redistribution and wait until BGP_ASN is available to enable static route redistribution.

How to verify it
Add unit test to cover the scenario and verify the functionality on a virtual switch.
qiluo-msft pushed a commit that referenced this issue Jul 13, 2021
Why I did it
Static route configuration should not depend on BGP_ASN. Remove the dependency on BGP_ASN for StaticRouteMgr.
Fix #8027

How I did it
Check if BGP_ASN field before configuring static route redistribution and wait until BGP_ASN is available to enable static route redistribution.

How to verify it
Add unit test to cover the scenario and verify the functionality on a virtual switch.
judyjoseph pushed a commit that referenced this issue Jul 13, 2021
Why I did it
Static route configuration should not depend on BGP_ASN. Remove the dependency on BGP_ASN for StaticRouteMgr.
Fix #8027

How I did it
Check if BGP_ASN field before configuring static route redistribution and wait until BGP_ASN is available to enable static route redistribution.

How to verify it
Add unit test to cover the scenario and verify the functionality on a virtual switch.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this issue Aug 7, 2021
…#8037)

Why I did it
Static route configuration should not depend on BGP_ASN. Remove the dependency on BGP_ASN for StaticRouteMgr.
Fix sonic-net#8027

How I did it
Check if BGP_ASN field before configuring static route redistribution and wait until BGP_ASN is available to enable static route redistribution.

How to verify it
Add unit test to cover the scenario and verify the functionality on a virtual switch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants