diff --git a/dockers/docker-fpm-frr/base_image_files/TS b/dockers/docker-fpm-frr/base_image_files/TS index fb1c077cb37..1a04385370c 100755 --- a/dockers/docker-fpm-frr/base_image_files/TS +++ b/dockers/docker-fpm-frr/base_image_files/TS @@ -4,10 +4,11 @@ [ -f /etc/sonic/sonic-environment ] && . /etc/sonic/sonic-environment PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`} -type=`sonic-db-cli CONFIG_DB hget 'DEVICE_METADATA|localhost' 'type'` +subtype=`sonic-db-cli CONFIG_DB hget 'DEVICE_METADATA|localhost' 'subtype'` TSA_CHASSIS_STATE=false -if [[ $type == *"SpineRouter"* ]]; then +if [[ $subtype == *"UpstreamLC"* || $subtype == *"DownstreamLC"* ]]; then + # Check supervisor TSA state, only required on chassis linecard TSA_CHASSIS_STATE="$(sonic-db-cli CHASSIS_APP_DB HGET "BGP_DEVICE_GLOBAL|STATE" tsa_enabled)" fi diff --git a/dockers/docker-fpm-frr/base_image_files/TSA b/dockers/docker-fpm-frr/base_image_files/TSA index e80857c34f6..ad6e31c11fa 100755 --- a/dockers/docker-fpm-frr/base_image_files/TSA +++ b/dockers/docker-fpm-frr/base_image_files/TSA @@ -58,13 +58,9 @@ if [ -z "$STARTED_BY_TSA_TSB_SERVICE" ]; then fi /usr/bin/TS TSA -if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.type)" == *"SpineRouter"* ]] ; then - if [[ "$1" != "chassis" ]] ; then - echo "Please execute 'sudo config save' to preserve System mode in Maintenance after reboot or config reload" - if [[ $disaggregated_chassis -ne 1 ]]; then - echo -e "\nWARNING: Please execute 'TSA' on all other linecards of the chassis to fully isolate this device" - fi - fi -else - echo "Please execute 'sudo config save' to preserve System mode in Maintenance after reboot or config reload" -fi +echo "Please execute 'sudo config save' to preserve System mode in Maintenance after reboot or config reload" + +subtype=`sonic-db-cli CONFIG_DB hget 'DEVICE_METADATA|localhost' 'subtype'` +if [[ $subtype == *"UpstreamLC"* || $subtype == *"DownstreamLC"* ]] ; then + echo -e "\nWARNING: Please execute 'TSA' on Supervisor or on all other linecards of the chassis to fully isolate the chassis" +fi \ No newline at end of file diff --git a/dockers/docker-fpm-frr/base_image_files/TSB b/dockers/docker-fpm-frr/base_image_files/TSB index 649d1bb4922..20fb9c8140a 100755 --- a/dockers/docker-fpm-frr/base_image_files/TSB +++ b/dockers/docker-fpm-frr/base_image_files/TSB @@ -57,10 +57,4 @@ if [ -z "$STARTED_BY_TSA_TSB_SERVICE" ]; then fi /usr/bin/TS TSB -if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.type)" == *"SpineRouter"* ]] ; then - if [[ "$1" != "chassis" ]] ; then - echo "Please execute 'sudo config save' to preserve System mode in Normal state after reboot or config reload" - fi -else - echo "Please execute 'sudo config save' to preserve System mode in Normal state after reboot or config reload" -fi +echo "Please execute 'sudo config save' to preserve System mode in Normal state after reboot or config reload" diff --git a/dockers/docker-fpm-frr/base_image_files/prefix_list b/dockers/docker-fpm-frr/base_image_files/prefix_list index e4d7c7d6eef..a98881095ab 100755 --- a/dockers/docker-fpm-frr/base_image_files/prefix_list +++ b/dockers/docker-fpm-frr/base_image_files/prefix_list @@ -37,11 +37,13 @@ check_spine_router() { type=$(sonic-cfggen -d -v DEVICE_METADATA.localhost.type) subtype=$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype) - # only supported on spine routers and UpstreamLC - if [[ "$type" != "SpineRouter" || "$subtype" != "UpstreamLC" ]]; then - echo "Operation is only supported on UpstreamLC of SpineRouter." >&2 - exit 1 + # only supported on UpstreamLC or UpperSpineRouter + if [[ ("$type" == "SpineRouter" && "$subtype" == "UpstreamLC") || "$type" == "UpperSpineRouter" ]] + exit 0 fi + + echo "Operation is only supported on Upstream SpineRouter." >&2 + exit 1 } # Function to skip operation on chassis supervisor diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/monitors/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/monitors/peer-group.conf.j2 index 45c60b81788..e1f9c791a5e 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/monitors/peer-group.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/monitors/peer-group.conf.j2 @@ -2,7 +2,7 @@ ! template: bgpd/templates/BGPMON/peer-group.conf.j2 ! neighbor BGPMON peer-group -{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %} +{% if CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'voq' or CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %} neighbor BGPMON update-source Loopback4096 {% elif loopback0_ipv4 %} neighbor BGPMON update-source {{ loopback0_ipv4 | ip }} @@ -16,7 +16,7 @@ neighbor BGPMON maximum-prefix 1 exit-address-family -{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %} +{% if CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'voq' or CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %} address-family ipv6 neighbor BGPMON activate neighbor BGPMON route-map FROM_BGPMON in diff --git a/dockers/docker-orchagent/switch.json.j2 b/dockers/docker-orchagent/switch.json.j2 index 63d3e80e317..88620bab782 100644 --- a/dockers/docker-orchagent/switch.json.j2 +++ b/dockers/docker-orchagent/switch.json.j2 @@ -13,6 +13,10 @@ {% set lag_hash_offset_value = 10 %} {% elif "SpineRouter" in DEVICE_METADATA.localhost.type %} {% set hash_seed = 25 %} +{% elif "FabricSpineRouter" in DEVICE_METADATA.localhost.type %} +{% set hash_seed = 40 %} +{% elif "UpperSpineRouter" in DEVICE_METADATA.localhost.type %} +{% set hash_seed = 50 %} {% endif %} {% endif %} {% if DEVICE_METADATA.localhost.namespace_id %} diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_prefix_list.py b/src/sonic-bgpcfgd/bgpcfgd/managers_prefix_list.py index cbd7fa77672..1686cfc4164 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_prefix_list.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_prefix_list.py @@ -46,8 +46,8 @@ def generate_prefix_list_config(self, data, add): if data["prefix_list_name"] != "ANCHOR_PREFIX": log_warn("PrefixListMgr:: Prefix list %s is not supported" % data["prefix_list_name"]) return False - if localhost_type != "SpineRouter" or subtype != "UpstreamLC": - log_warn("PrefixListMgr:: Prefix list %s is only supported on UpstreamLC of SpineRouter" % data["prefix_list_name"]) + if localhost_type not in ["UpperSpineRouter", "SpineRouter"] or (localhost_type == "SpineRouter" and subtype != "UpstreamLC"): + log_warn("PrefixListMgr:: Prefix list %s is only supported on Upstream SpineRouter" % data["prefix_list_name"]) return False # Add the anchor prefix to the radian configuration diff --git a/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/param_chassis.json b/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/param_chassis.json index 5c40842ccae..3b9663b6acb 100644 --- a/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/param_chassis.json +++ b/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/param_chassis.json @@ -1,7 +1,8 @@ { "CONFIG_DB__DEVICE_METADATA": { "localhost": { - "type": "SpineRouter" + "type": "SpineRouter", + "switch_type": "voq" } } }