-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[BGPD]: add bgp dynamic neighbor configuration #708
Conversation
@@ -65,6 +69,21 @@ router bgp {{ minigraph_bgp_asn }} | |||
{% endif %} | |||
{% endfor %} | |||
{% endblock bgp_sessions %} | |||
{% block bgp_peers_with_range %} | |||
{% if deploymentId and deploymentId_asn_map[deploymentId] %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it is better to make the failure explicit? when there is bgp peers with range, then we need to generate the passive peer. if deploymentId is not available, it is probably good to make the failure explicitly?
can you include sonic-quagga commit in this PR? |
dockers/docker-fpm-quagga/start.sh
Outdated
@@ -2,9 +2,9 @@ | |||
|
|||
mkdir -p /etc/quagga | |||
if [ -f /etc/sonic/bgp_admin.yml ]; then | |||
sonic-cfggen -m /etc/sonic/minigraph.xml -y /etc/sonic/bgp_admin.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/quagga/bgpd.conf | |||
sonic-cfggen -m /etc/sonic/minigraph.xml -y /etc/sonic/bgp_admin.yml -y /etc/sonic/deploymentId_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/quagga/bgpd.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we allow the case that deploymentId_asn_map.yml does not exist? -y
option will fail when the specified file does not exist so we'll need to do manual check beforehand.
I plan to add a -Y
option into sonic-cfggen that silently ignore it when yml file does not exist, but that's not happened yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we will allow the case that deploymentId_asn_map doesn't exist since we will copy a sample deploymentId_asn_map.yml when building the debian package (as what we have done for snmp.yml). I don't think we do manual check for snmp.yml (correct me if I am wrong). So we might don't have to check for this yml file as well?
@@ -0,0 +1,2 @@ | |||
deploymentId_asn_map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use a mixture of camelCaseNaming and underscore_naming here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought deployementId is one unique word. Will change the naming later.
src/sonic-config-engine/minigraph.py
Outdated
@@ -284,6 +295,7 @@ def parse_meta(meta, hname): | |||
ntp_servers = [] | |||
mgmt_routes = [] | |||
erspan_dst = [] | |||
deploymentId = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll suggest we unify to underscore_naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
src/sonic-config-engine/minigraph.py
Outdated
@@ -466,6 +483,7 @@ def parse_xml(filename, platform=None, port_config_file=None): | |||
results['ntp_servers'] = ntp_servers | |||
results['forced_mgmt_routes'] = mgmt_routes | |||
results['erspan_dst'] = erspan_dst | |||
results['deploymentId'] = deploymentId | |||
|
|||
return results | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a sample minigraph with bgp peers and corresponding test to the test folder?
src/sonic-config-engine/minigraph.py
Outdated
addr = bgpPeer.find(str(QName(ns, "Address"))).text | ||
if bgpPeer.find(str(QName(ns1, "PeersRange"))) is not None: | ||
name = bgpPeer.find(str(QName(ns1, "Name"))).text | ||
range = bgpPeer.find(str(QName(ns1, "PeersRange"))).text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll recommend another var name rather than overriding built-in range
.
@@ -0,0 +1,2 @@ | |||
deployment_id_asn_map: | |||
"1" : 12345 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a private ASN? 65432 or something like that.
Is build failure related with this change? |
* [build_debian]: Add dbus package to update timezone (#702) Signed-off-by: Hiayang Zheng [email protected] * [Accton]: Add a new supported device and platform, AS7712-32X (#662) * platform/broadcom: Add a new supported device and platform, AS7712-32X * Switch Vendor: Edge-core * Switch SKU: AS7712-32X * ASIC Vendor: Broadcom * Swich ASIC: Tomahawk * Port Configuration: 32x100G * SONiC Image: SONiC-ONIE-Broadcom Signed-off-by: [email protected] * [image]: load platform specific settings in sonic-to-sonic upgrade (#710) * [submodule]: Update sairedis submodule (#712) Include fix for saithrift port split parsing * [docker-ptf]: Install exabgp in docker ptf (#709) * [platform]: fix file mode for acction platform to create clean build (#714) * [image]: expand dockerfs.tar.gz directly on to disk without intermediate file (#715) * [submodule]: update swss/sairedis/swss-common submodule (#716) fix bug for logrotate sairedis log * [submodule]: update sonic-swss (#719) * [image]: add debian security update in the apt source list (#724) * [submodule]: update sonic-platform-daemons (#722) * [platform]: turn on/off four leds for breakout-able front panel ports (#723) turn on/off four leds for breakout-able front panel ports on arista 7050 qx32 platform * [sonic-quagga]:update submodule (#718) Signed-off-by: Sihui Han <[email protected]> * Add Broadcom LED microprocessor initialization for Dell S6000 (#726) * Add Broadcom LED microprocessor initialization for Dell S6000 * Increase bcmcmd timeout to 60 seconds * [platform]: Update sonic-platform-modules-arista (#727) * [Broadcom]: Update SAI package to support Accton-AS7712-C32 (#720) * Remove exsiting sonic-platform-modules-accton and apply submodule add… (#717) * Remove exsiting sonic-platform-modules-accton and apply submodule adding on this folder. * Remove redundant commnet * Remove folder platform/broadcom/sonic-platform-modules-accton. * Add this dir for submodule. * [submodule]: update sonic-platform-daemons submodule (#731) * [installer] Copy old config files rather than only minigraph (#730) * [BGPD]: add bgp dynamic neighbor configuration (#708) * add bgp dynamic neighbor configuration * [bgpd]: update as comments * update as comment * update to deployment_id_asn_map * minor change * [docker-syncd-brcm]: Sleep to allow syncd to create socket before calling bcmcmd (#733) * [docker-syncd-brcm]: Sleep to allow syncd to create socket before calling bcmcmd * Instead of fixed sleep interval, continually check for presence of socket * [sonic-cfggen]: Support multiple input yaml files with -y option (#729) * [sonic-cfggen]: Fix minigraph.py when port_alias_map absent (#738) * [bgp]: move allowas-in into ipv6 section to enable allowas-in for ipv6 (#741) * [swss]: Sleep 5 min regardless of arp_update return code (#743) - arp_update return code is not guaranteed to be true/false. When there is no VLAN, arp_update will return true. When there are VLANs, arp_update will return false because the command arping returns 1 due to the option '-w 0'. - This script should be run every 5 minutes regardless of the return code. * [Mellanox]: Update SAI version (#740) - Initialize ECMP default hashing with IPv6 packets * [sonic-cfggen]: Add default IP deny rule in translate_acl (#734) - Add IPv4 implicit rule: deny ip any any This implicit rule has lowest priority and ensures that the device denies all unmatched IP traffic. * [docker-platform-monitor]: Add fancontrol (#735) * Fix typo in README (#750) * Fix typo in README * Fix comment * Fix README * [DHCP Relay]: Add support for custom Option 82 circuit_id of the form '<hostname>:<portname>' (#747) * Add docker-dhcp-relay/Dockerfile to .gitignore * Add isc-dhcp-relay .deb package to image build process, along with my Option 82 patch * Install custom isc-dhcp-relay in dhcp_relay docker * Install isc-dhcp-relay build dependencies in sonic-slave Docker container * Copy the built .deb package to the destination directory * Add dependencies for isc-dhcp-relay * Change Option 82 string to '<hostname>:<portname>' * Install dependencies of .deb files implicitly in Dockerfile * Remove unused line * Remove unnecessary space * [Accton]: Add a new supported device and platform AS7716-32X (#732) Switch Vendor: Edge-core Switch SKU: AS7716-32X ASIC Vendor: Broadcom Swich ASIC: Tomahawk Port Configuration: 32x100G SONiC Image: SONiC-ONIE-Broadcom Signed-off-by: [email protected] * [.gitignore]: Update src, config engine (#754) Signed-off-by: marian-pritsak <[email protected]> * [submodule]: update sonic-swss (#755) * [sonic-swss-common]: Submodule update (#759) * [mgmt slave] Install correct version of python-cffi (#760) * [DHCP Relay]: Fix Option 82 string - Remove quotes; add MAC address of receiving port as remote_id (#763) * [platform]: add front panel index in port_config.ini for s6100 (#752) * add front panel index in port_config.ini * [igb]: change download url to azure storage url (#770) * [baseimage]: Increase net.core.rmem_max to 2097152 (#767) * Increase net.core.rmem_max to 2097152 * Update Ingrasys platform submodule (#764) * Remove specific fancontrol service. Signed-off-by: Wade He <[email protected]> * [Broadcom]: Update SAI package to support Celestica Seastone DX010 and Accton AS7716 (#768) * [LLDP]: Port description (TLV 4) now contains '<neighbor_host_name>:<port_name>' (#772) * [sonic-slave]: install docker-ce 17.03.02 stable version (#774) * [device]: add minigraph and LED support for Arista 7050 QX32S (#773) * Update submodules: sairedis, swss
* e7bb548 2018-11-28 | [aclorch]: Store control plane ACL tables in orchagent (#708) (HEAD, origin/201803) [Shuotian Cheng] Signed-off-by: Guohan Lu <[email protected]>
c12c443 - 2019-10-22 : [command reference] add warm reboot command document (#704) [Ying Xie] e25cf29 - 2019-10-22 : [PR template] Add reminder to add/modify/remove unit tests as appropriate (#708) [Joe LeVeque] 66eafce - 2019-10-19 : [Command Reference] Unify style and formatting; Fix organization; Other fixes (#707) [Joe LeVeque] f32a450 - 2019-10-19 : [generate_dump] Make regex more specific for disabling/enabling logrotate (#701) [Kalimuthu-Velappan] d77c411 - 2019-10-18 : [netstat]: Fix for negative output values of counters after clear counters operation (#697) [lyndonsiao] fc324f2 - 2019-10-18 : [neighbor_advertiser]: Adapt to different mirror ACL table names (#703) [Shuotian Cheng] 342f3a1 - 2019-10-08 : [intfstat,portstat] fix table_as_json (#691) [Mykola F] 5564d87 - 2019-10-07 : [acl-loader] egress mirror action support and action ASIC support check (#575) [Stepan Blyshchak]
To prevent control plane ACL rules from being stored in the pending task set, store the control plane ACL table in orchagent first and check if the ACL rule is associated with control plane ACL table and ignore it. The next step is to combine the data structure of control plane ACL tables and data plane ACL tables to make the code more efficient. Add unit test to ensure control plane ACL table won't be added to the ASIC database. Signed-off-by: Shu0T1an ChenG <[email protected]>
[sairedis] Advance sairedis pointer to support cmd zmq flag [meta] Use memcpy instead of cast to prevent strict-aliasing error (#723) [vslib]Add MACsec forward and filters to HostInterfaceInfo (#719) [vslib] Add StateBase function for MACsec (#717) Add support for default zmq synchronous mode flag (#711) [syncd] Code clean (#720) [sairedis] Remove custom bulk fdb methods (#710) [vslib]Add MACsec Filters (#713) [vslib]Add MACsec Forwarder (#714) [vslib]Add MACsec Manager (#715) Add helper functions, findObjects and dumpObject (#716) Code clean refactor (#712) [vslib] Fix CorePortIndexMap log line (#708) [meta] Use custom hash in SaiObjectCollection (#709) Fix LGTM localtime function warnings (#707) [vs] VoQ Switch objects initialization - Local Port OID mapping to System Ports (#703) Code style refactor (#705) [vs] Initialization of VOQ switch objects (#702) [vs] SAI support for VOQ switches - Switch State Initialization (#701) Add MACsec meta methods (#704) [vs] SAI support for VOQ switches (#698) [vs] SAI support for VOQ switches - Core Port Index Map File parser (#700) [vs] SAI support for VoQ switch - Core Port Index Map Container (#699) [syncd][sairedis] Change pub/sub model to push/pull in zmq notification (#695) [syncd] Use lua script to update db when using bulk api (#690) [syncd] Fix bulk api object type for next hop group members (#685) Add FlexCounter for MACsec SA (#684)
…t#6064) [sairedis] Advance sairedis pointer to support cmd zmq flag [meta] Use memcpy instead of cast to prevent strict-aliasing error (sonic-net#723) [vslib]Add MACsec forward and filters to HostInterfaceInfo (sonic-net#719) [vslib] Add StateBase function for MACsec (sonic-net#717) Add support for default zmq synchronous mode flag (sonic-net#711) [syncd] Code clean (sonic-net#720) [sairedis] Remove custom bulk fdb methods (sonic-net#710) [vslib]Add MACsec Filters (sonic-net#713) [vslib]Add MACsec Forwarder (sonic-net#714) [vslib]Add MACsec Manager (sonic-net#715) Add helper functions, findObjects and dumpObject (sonic-net#716) Code clean refactor (sonic-net#712) [vslib] Fix CorePortIndexMap log line (sonic-net#708) [meta] Use custom hash in SaiObjectCollection (sonic-net#709) Fix LGTM localtime function warnings (sonic-net#707) [vs] VoQ Switch objects initialization - Local Port OID mapping to System Ports (sonic-net#703) Code style refactor (sonic-net#705) [vs] Initialization of VOQ switch objects (sonic-net#702) [vs] SAI support for VOQ switches - Switch State Initialization (sonic-net#701) Add MACsec meta methods (sonic-net#704) [vs] SAI support for VOQ switches (sonic-net#698) [vs] SAI support for VOQ switches - Core Port Index Map File parser (sonic-net#700) [vs] SAI support for VoQ switch - Core Port Index Map Container (sonic-net#699) [syncd][sairedis] Change pub/sub model to push/pull in zmq notification (sonic-net#695) [syncd] Use lua script to update db when using bulk api (sonic-net#690) [syncd] Fix bulk api object type for next hop group members (sonic-net#685) Add FlexCounter for MACsec SA (sonic-net#684)
Update sonic-swss-common submodule pointer to include the following: * 6b6842a [NotificationProducer] add pipeline support ([sonic-net#708](sonic-net/sonic-swss-common#708)) * 2cb5ea0 Increase the netlink buffer size from 3MB to 16MB. ([sonic-net#739](sonic-net/sonic-swss-common#739)) * dacbdad RedisPipeline ignore flush when call dtor from another thread. ([sonic-net#736](sonic-net/sonic-swss-common#736)) Signed-off-by: dprital <[email protected]>
``` 6b6842a [NotificationProducer] add pipeline support (sonic-net#708) 2cb5ea0 Increase the netlink buffer size from 3MB to 16MB. (sonic-net#739) dacbdad RedisPipeline ignore flush when call dtor from another thread. (sonic-net#736) ``` Signed-off-by: Stepan Blyschak <[email protected]>
Update sonic-swss-common submodule pointer to include the following: * 6b6842a [NotificationProducer] add pipeline support ([#708](sonic-net/sonic-swss-common#708)) * 2cb5ea0 Increase the netlink buffer size from 3MB to 16MB. ([#739](sonic-net/sonic-swss-common#739)) * dacbdad RedisPipeline ignore flush when call dtor from another thread. ([#736](sonic-net/sonic-swss-common#736)) Signed-off-by: dprital <[email protected]>
This pr depends on sonic-quagga submodule update, and need to be merged after sonic-net/sonic-quagga#14 #718
This PR is to add bgp dynamic neighbor configuration support in bgpd.conf.j2, which will be used for bgp speaker.
We include a sample bgp speaker minigraph under /sonic-config-engine/tests/. To use this feature, it requires to add deploymentId in metadata and BGPPeer with PeersRange in cpg in minigraph. And currently it uses deployment_id_asn_map file to obtain the asn number of bgp speakers (with peer range) based on deploymentid. We will try to get rid of this deployment_id_asn mapping in future.