You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@staticmethoddefsplit_key(key):
""" Split key into vrf name and prefix. :param key: key to split :return: vrf name extracted from the key, ip prefix extracted from the key """if'|'notinkey:
return'default', keyelse:
returntuple(key.split('|', 1))
It causes a few problems:
We could have two entries in CONFIG DB which point to the same static route. The two entries may have different next hop which could confuse user
config route del prefix vrf default 1.1.1.0/24 cannot remove entry STATIC_ROUTE|1.1.1.0/24; config route del prefix 1.1.1.0/24 cannot remove entry STATIC_ROUTE|default|1.1.1.0/24
Description
config route add prefix vrf default 1.1.1.0/24 ...
adds entrySTATIC_ROUTE|default|1.1.1.0/24
to CONFIG DB;config route add prefix 1.1.1.0/24 ...
adds entrySTATIC_ROUTE|1.1.1.0/24
to CONFIG DB.For bgpcfgd,
STATIC_ROUTE|default|1.1.1.0/24
andSTATIC_ROUTE|1.1.1.0/24
are the same route entry. Seesonic-buildimage/src/sonic-bgpcfgd/bgpcfgd/managers_static_rt.py
Line 94 in 2d4ab9e
It causes a few problems:
config route del prefix vrf default 1.1.1.0/24
cannot remove entrySTATIC_ROUTE|1.1.1.0/24
;config route del prefix 1.1.1.0/24
cannot remove entrySTATIC_ROUTE|default|1.1.1.0/24
Steps to reproduce the issue:
Describe the results you received:
See two route entries in CONFIG DB which point to the same static route
Describe the results you expected:
Only one route entry should exist in CONFIG DB for the same route
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
Workaround:
config route add prefix vrf default <ip_prefix>
andconfig route add prefix vrf <ip_prefix>
for the same ip_prefix togetherconfig route del prefix vrf default <ip_prefix>
to remove static routes created byconfig route add prefix vrf default <ip_prefix>
config route del prefix vrf <ip_prefix>
to remove static routes created byconfig route add prefix vrf <ip_prefix>
The text was updated successfully, but these errors were encountered: