forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 6851858: [Storage BE] BGP policy fixes - do not advertise l…
…oopback Fix errors introduced as part of https://msazure.visualstudio.com/One/_git/Networking-acs-buildimage/pullrequest/6564625?path=/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.storage.backend/instance.conf.j2 * fix the route map for BT1 * fix the condition to not advertise loopback for storage BT0 and BT1 * add unit tests which can catch the loopback advertisement issue Verified by applying these templates on bt1 and bt0 of bz6prdstr12 and bgp sessions are up and routes are advertised as expected
- Loading branch information
1 parent
a11f33f
commit 5255a09
Showing
12 changed files
with
158 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
22 changes: 9 additions & 13 deletions
22
src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v4.tor.stbk.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
! | ||
! template: bgpd/templates/general/peer-group.conf.j2 | ||
! template: bgpd/templates/msft.general/v4.tor.storage.backend/peer-group.conf.j2 | ||
! | ||
! template: bgpd/templates/msft.general/v4.tor.backend/peer-group.conf.j2 | ||
! | ||
neighbor FE_TIER0_V4 peer-group | ||
neighbor TIER1_V4 peer-group | ||
address-family ipv4 unicast | ||
neighbor FE_TIER0_V4 activate | ||
neighbor FE_TIER0_V4 soft-reconfiguration inbound | ||
neighbor FE_TIER0_V4 route-map FROM_FE_TIER0_V4 in | ||
neighbor FE_TIER0_V4 route-map TO_FE_TIER0_V4 out | ||
neighbor FE_TIER0_V4 send-community | ||
neighbor FE_TIER0_V4 maximum-prefix 12000 90 warning-only | ||
neighbor TIER1_V4 activate | ||
neighbor TIER1_V4 soft-reconfiguration inbound | ||
neighbor TIER1_V4 route-map FROM_TIER1_V4 in | ||
neighbor TIER1_V4 route-map TO_TIER1_V4 out | ||
neighbor TIER1_V4 send-community | ||
neighbor TIER1_V4 maximum-prefix 12000 90 warning-only | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/msft.general/v4.tor.backend/peer-group.conf.j2 | ||
! | ||
! end of template: bgpd/templates/general/peer-group.conf.j2 | ||
! end of template: bgpd/templates/msft.general/v4.tor.storage.backend/peer-group.conf.j2 | ||
! |
42 changes: 42 additions & 0 deletions
42
src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/stbk_t0.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
! | ||
! template: bgpd/bgpd.main.conf.j2 | ||
! | ||
! bgp multiple-instance | ||
! | ||
! BGP configuration | ||
! | ||
! TSA configuration | ||
! | ||
ip prefix-list PL_LoopbackV4 permit 55.55.55.55/32 | ||
! | ||
! | ||
ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24 | ||
! | ||
! | ||
! | ||
! | ||
router bgp 55555 | ||
! | ||
bgp log-neighbor-changes | ||
no bgp default ipv4-unicast | ||
no bgp ebgp-requires-policy | ||
! | ||
! | ||
! | ||
bgp router-id 55.55.55.55 | ||
! | ||
! | ||
! | ||
network 10.10.10.1/24 | ||
! | ||
! | ||
! | ||
address-family ipv4 | ||
maximum-paths 64 | ||
exit-address-family | ||
address-family ipv6 | ||
maximum-paths 64 | ||
exit-address-family | ||
! | ||
! end of template: bgpd/bgpd.main.conf.j2 | ||
! |
27 changes: 27 additions & 0 deletions
27
src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/stbk_t0.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"bgp_asn": "55555", | ||
"type": "BackEndToRRouter", | ||
"storage_device": "true" | ||
} | ||
}, | ||
"LOOPBACK_INTERFACE": { | ||
"Loopback0|55.55.55.55/32": {} | ||
}, | ||
"VLAN_INTERFACE": { | ||
"Vlan10|10.10.10.1/24": {} | ||
}, | ||
"constants": { | ||
"bgp": { | ||
"multipath_relax": {}, | ||
"graceful_restart": { | ||
"enabled": true, | ||
"restart_time": 480 | ||
}, | ||
"maximum_paths": { | ||
"enabled": true | ||
} | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/stbk_t1.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
! | ||
! template: bgpd/bgpd.main.conf.j2 | ||
! | ||
! bgp multiple-instance | ||
! | ||
! BGP configuration | ||
! | ||
! TSA configuration | ||
! | ||
ip prefix-list PL_LoopbackV4 permit 55.55.55.55/32 | ||
! | ||
! | ||
! | ||
! | ||
router bgp 55555 | ||
! | ||
bgp log-neighbor-changes | ||
no bgp default ipv4-unicast | ||
no bgp ebgp-requires-policy | ||
! | ||
! | ||
! | ||
bgp router-id 55.55.55.55 | ||
! | ||
! | ||
! | ||
! | ||
! | ||
! | ||
address-family ipv4 | ||
maximum-paths 64 | ||
exit-address-family | ||
address-family ipv6 | ||
maximum-paths 64 | ||
exit-address-family | ||
! | ||
! end of template: bgpd/bgpd.main.conf.j2 | ||
! |
23 changes: 23 additions & 0 deletions
23
src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/stbk_t1.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"bgp_asn": "55555", | ||
"type": "BackEndLeafRouter", | ||
"storage_device": "true" | ||
} | ||
}, | ||
"LOOPBACK_INTERFACE": { | ||
"Loopback0|55.55.55.55/32": {} | ||
}, | ||
"constants": { | ||
"bgp": { | ||
"multipath_relax": {}, | ||
"graceful_restart": { | ||
"enabled": true | ||
}, | ||
"maximum_paths": { | ||
"enabled": true | ||
} | ||
} | ||
} | ||
} |
This file contains 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