Skip to content

Commit

Permalink
Revert suppress FIB pending feature (sonic-net#19027)
Browse files Browse the repository at this point in the history
Why I did it
Revert BGP suppress FIB pending due to unresolved FRR issues in current version

Work item tracking
Microsoft ADO (number only):
How I did it
Revert it

How to verify it
Build and run
  • Loading branch information
stepanblyschak committed Jul 12, 2024
1 parent a5aee14 commit 4397a85
Show file tree
Hide file tree
Showing 34 changed files with 4 additions and 89 deletions.
1 change: 0 additions & 1 deletion dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
!
{% block bgp_init %}
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
{% if (DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'].lower() == 'dualtor') %}
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ stderr_logfile=syslog
dependent_startup=true

[program:zebra]
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl -M snmp --asic-offload=notify_on_offload
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl -M snmp
priority=4
autostart=false
autorestart=false
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-sonic-vs/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ environment=ASAN_OPTIONS="log_path=/var/log/asan/teammgrd-asan.log{{ asan_extra_
{% endif %}

[program:zebra]
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl --asic-offload=notify_on_offload
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl
priority=13
autostart=false
autorestart=false
Expand Down
5 changes: 2 additions & 3 deletions src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,10 @@ def apply_op(self, cmd, vrf):
:return: True if no errors, False if there are errors
"""
bgp_asn = self.directory.get_slot("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME)["localhost"]["bgp_asn"]
enable_bgp_suppress_fib_pending_cmd = 'bgp suppress-fib-pending'
if vrf == 'default':
cmd = ('router bgp %s\n %s\n' % (bgp_asn, enable_bgp_suppress_fib_pending_cmd)) + cmd
cmd = ('router bgp %s\n' % bgp_asn) + cmd
else:
cmd = ('router bgp %s vrf %s\n %s\n' % (bgp_asn, vrf, enable_bgp_suppress_fib_pending_cmd)) + cmd
cmd = ('router bgp %s vrf %s\n' % (bgp_asn, vrf)) + cmd
self.cfg_mgr.push(cmd)
return True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ route-map HIDE_INTERNAL permit 20
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ip prefix-list PL_LoopbackV4 permit 55.55.55.55/32
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ ipv6 prefix-list PL_LoopbackV6 permit fc00::1/128
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 55555
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
5 changes: 0 additions & 5 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
console_device_types = ['MgmtTsToR']
dhcp_server_enabled_device_types = ['BmcMgmtToRRouter']
mgmt_device_types = ['BmcMgmtToRRouter', 'MgmtToRRouter', 'MgmtTsToR']
leafrouter_device_types = ['LeafRouter']

# Counters disabled on management devices
mgmt_disabled_counters = ["BUFFER_POOL_WATERMARK", "PFCWD", "PG_DROP", "PG_WATERMARK", "PORT_BUFFER_DROP", "QUEUE", "QUEUE_WATERMARK"]
Expand Down Expand Up @@ -2708,10 +2707,6 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
if current_device and current_device['type'] in mgmt_device_types:
results["FLEX_COUNTER_TABLE"] = {counter: {"FLEX_COUNTER_STATUS": "disable"} for counter in mgmt_disabled_counters}

# Enable bgp-suppress-fib by default for leafrouter
if current_device and current_device['type'] in leafrouter_device_types:
results['DEVICE_METADATA']['localhost']['suppress-fib-pending'] = 'enabled'

return results

def get_tunnel_entries(tunnel_intfs, tunnel_intfs_qos_remap_config, lo_intfs, tunnel_qos_remap, mux_tunnel_name, peer_switch_ip):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
coalesce-time 10000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
1 change: 0 additions & 1 deletion src/sonic-config-engine/tests/sample_output/py2/frr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ ip prefix-list PL_LoopbackV4 permit 4.0.0.0/32
router bgp 4000
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
coalesce-time 10000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ route-map HIDE_INTERNAL permit 10
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
1 change: 0 additions & 1 deletion src/sonic-config-engine/tests/sample_output/py3/frr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27
router bgp 65100
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ ip prefix-list PL_LoopbackV4 permit 4.0.0.0/32
router bgp 4000
!
bgp log-neighbor-changes
bgp suppress-fib-pending
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,6 @@
"DEVICE_METADATA_ADVERTISE_LO_PREFIX_AS_128": {
"desc": "Verifying advertising lo prefix as /128."
},
"DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED": {
"desc": "Enable bgp-suppress-fib-pending"
},
"DEVICE_METADATA_SUPPRESS_PENDING_FIB_DISABLED": {
"desc": "Disable bgp-suppress-fib-pending"
},
"DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED_SYNCHRONOUS_MODE_DISABLED": {
"desc": "Enable bgp-suppress-fib-pending when synchronous mode is disabled",
"eStr": ["ASIC synchronous mode must be enabled in order to enable suppress FIB pending feature"]
},
"DEVICE_METADATA_VALID_RACK_MGMT_MAP": {
"desc": "Verifying rack_mgmt_map configuration."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,36 +361,6 @@
}
}
},
"DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"synchronous_mode": "enable",
"suppress-fib-pending": "enabled"
}
}
}
},
"DEVICE_METADATA_SUPPRESS_PENDING_FIB_DISABLED": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"synchronous_mode": "disable",
"suppress-fib-pending": "disabled"
}
}
}
},
"DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED_SYNCHRONOUS_MODE_DISABLED": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"synchronous_mode": "disable",
"suppress-fib-pending": "enabled"
}
}
}
},
"DEVICE_METADATA_VALID_RACK_MGMT_MAP": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
Expand Down
12 changes: 0 additions & 12 deletions src/sonic-yang-models/yang-models/sonic-device_metadata.yang
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,6 @@ module sonic-device_metadata {
By default SONiC advertises /128 subnet prefix in Loopback0 as /64 subnet route";
}

leaf suppress-fib-pending {
description "Enable BGP suppress FIB pending feature. BGP will wait for route FIB installation before announcing routes";
type enumeration {
enum enabled;
enum disabled;
}
default disabled;

must "((current() = 'disabled') or (current() = 'enabled' and ../synchronous_mode = 'enable'))" {
error-message "ASIC synchronous mode must be enabled in order to enable suppress FIB pending feature";
}
}
leaf rack_mgmt_map {
type string {
length 0..128 {
Expand Down

0 comments on commit 4397a85

Please sign in to comment.