Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BGP]Introduce bgp update delay to control how long bgp stays in readonly mode during init #108

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ route-map HIDE_INTERNAL permit 20
!
{% endif %}
!
{% if constants.bgp.update_delay is defined %}
bgp update-delay {{ constants.bgp.update_delay }}
{% endif %}
!
{% if (DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('bgp_asn' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['bgp_asn'].lower() != 'none') and (DEVICE_METADATA['localhost']['bgp_asn'].lower() != 'null') %}
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
!
Expand Down
1 change: 1 addition & 0 deletions files/image_config/constants/constants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ constants:
enabled: true
ipv4: 514
ipv6: 514
update_delay: 20
allow_list:
enabled: true
default_action: "permit" # or "deny"
Expand Down
2 changes: 2 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py2/bgpd_frr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27
!
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ route-map HIDE_INTERNAL permit 10
set community no-export
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27
!
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27
!
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ route-map HIDE_INTERNAL permit 10
set community no-export
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ route-map FROM_BGP_SPEAKER_V4 permit 10
!
route-map TO_BGP_SPEAKER_V4 deny 10
!
bgp update-delay 20
!
router bgp 65100
bgp log-neighbor-changes
bgp bestpath as-path multipath-relax
Expand Down
2 changes: 2 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py2/frr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.0.0/27
!
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ ip prefix-list PL_LoopbackV4 permit 4.0.0.0/32
!
!
!
bgp update-delay 20
!
router bgp 4000
!
bgp log-neighbor-changes
Expand Down
2 changes: 2 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py3/bgpd_frr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27
!
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ route-map HIDE_INTERNAL permit 10
set community no-export
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27
!
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27
!
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ route-map HIDE_INTERNAL permit 10
set community no-export
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ route-map FROM_BGP_SPEAKER_V4 permit 10
!
route-map TO_BGP_SPEAKER_V4 deny 10
!
bgp update-delay 20
!
router bgp 65100
bgp log-neighbor-changes
bgp bestpath as-path multipath-relax
Expand Down
2 changes: 2 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py3/frr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 192.168.200.0/27
!
!
!
bgp update-delay 20
!
router bgp 65100
!
bgp log-neighbor-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ ip prefix-list PL_LoopbackV4 permit 4.0.0.0/32
!
!
!
bgp update-delay 20
!
router bgp 4000
!
bgp log-neighbor-changes
Expand Down
Loading