Skip to content
Merged
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
5 changes: 3 additions & 2 deletions dockers/docker-fpm-frr/base_image_files/TS
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 5 additions & 9 deletions dockers/docker-fpm-frr/base_image_files/TSA
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,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"
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
8 changes: 1 addition & 7 deletions dockers/docker-fpm-frr/base_image_files/TSB
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,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"
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions dockers/docker-orchagent/switch.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"CONFIG_DB__DEVICE_METADATA": {
"localhost": {
"type": "SpineRouter"
"type": "SpineRouter",
"switch_type": "voq"
}
}
}