parent
98cc292390
commit
99d6003717
@ -4,7 +4,7 @@ switch_type=`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['switch_type']"`
|
||||
# Check whether the routemap is for internal BGP sessions.
|
||||
function is_internal_route_map()
|
||||
{
|
||||
[[ "$1" =~ .*"_INTERNAL_".* && $switch_type != "chassis-packet" ]]
|
||||
[[ "$1" =~ .*"_INTERNAL_".* || "$1" =~ .*"VOQ_".* ]]
|
||||
}
|
||||
|
||||
function check_not_installed()
|
||||
|
@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /etc/sonic/chassisdb.conf ]; then
|
||||
rexec all -c "TSA chassis"
|
||||
echo "Please execute \"rexec all -c 'sudo config save -y'\" to preserve System mode in Maintenance after reboot\
|
||||
or config reload on all linecards"
|
||||
exit 0
|
||||
fi
|
||||
# toggle the mux to standby if dualtor and any mux active
|
||||
if
|
||||
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] &&
|
||||
@ -10,4 +16,11 @@ then
|
||||
fi
|
||||
|
||||
/usr/bin/TS TSA
|
||||
echo "Please execute 'config save' to preserve System mode in Maintenance after reboot or config reload"
|
||||
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"
|
||||
echo -e "\nWARNING: Please execute 'TSA' on all other linecards of the chassis to fully isolate this device"
|
||||
fi
|
||||
else
|
||||
echo "Please execute 'sudo config save' to preserve System mode in Maintenance after reboot or config reload"
|
||||
fi
|
@ -1,5 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If run on supervisor of chassis, trigger remote execution of TSB on all linecards
|
||||
if [ -f /etc/sonic/chassisdb.conf ]; then
|
||||
rexec all -c "TSB chassis"
|
||||
echo "Please execute \"rexec all -c 'sudo config save -y'\" to preserve System mode in Normal state after reboot\
|
||||
or config reload on all linecards"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# toggle the mux to auto if dualtor
|
||||
if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]];
|
||||
then
|
||||
@ -8,4 +16,10 @@ then
|
||||
fi
|
||||
|
||||
/usr/bin/TS TSB
|
||||
echo "Please execute 'config save' to preserve System mode in Normal state after reboot or config reload"
|
||||
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
|
||||
|
@ -1,8 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/bin/TS TSC
|
||||
if [ -f /etc/sonic/chassisdb.conf ]; then
|
||||
if [[ $1 == "no-stats" ]]; then
|
||||
rexec all -c "TSC no-stats"
|
||||
else
|
||||
rexec all -c "TSC"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
portstat -p 5
|
||||
/usr/bin/TS TSC
|
||||
[[ $1 != "no-stats" ]] && portstat -p 5
|
||||
|
||||
if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]]
|
||||
then
|
||||
|
@ -109,15 +109,7 @@ run_hookdir() {
|
||||
reload_minigraph()
|
||||
{
|
||||
echo "Reloading minigraph..."
|
||||
if
|
||||
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] ||
|
||||
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.type | tr [:upper:] [:lower:])" == *"leafrouter"* ]];
|
||||
then
|
||||
#Keep device isolated with traffic-shift-away option on LeafRouter and Dualtor
|
||||
config load_minigraph -y -n -t
|
||||
else
|
||||
config load_minigraph -y -n
|
||||
fi
|
||||
config load_minigraph -y -n
|
||||
config save -y
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ class DeviceGlobalCfgMgr(Manager):
|
||||
for rm in sorted(route_map_names):
|
||||
# For packet-based chassis, the bgp session between the linecards are also considered internal sessions
|
||||
# While isolating a single linecard, these sessions should not be skipped
|
||||
if "_INTERNAL_" in rm and self.switch_type != "chassis-packet":
|
||||
if "_INTERNAL_" in rm or "VOQ_" in rm:
|
||||
continue
|
||||
if "V4" in rm:
|
||||
ipv="V4" ; ipp="ip"
|
||||
|
Reference in New Issue
Block a user