-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for TSA error logging on multi-asic (#11519)
- Loading branch information
Showing
4 changed files
with
48 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
#!/bin/bash | ||
|
||
|
||
if [[ "$(sonic-cfggen -d -v BGP_DEVICE_GLOBAL.STATE.tsa_enabled)" == "true" ]]; then | ||
echo "System is already in Maintenance" | ||
logger -t TSA -p user.info "System is already in Maintenance" | ||
else | ||
# toggle the mux to standby if dualtor and any mux active | ||
if | ||
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] && | ||
[[ $(show mux status | grep active | wc -l) > 0 ]]; | ||
then | ||
logger -t TSA -p user.info "Toggle all mux mode to standby" | ||
sudo config mux mode standby all | ||
fi | ||
|
||
/usr/bin/TS TSA | ||
echo "Please execute 'config save' to preserve System mode in Maintenance after reboot or config reload" | ||
# toggle the mux to standby if dualtor and any mux active | ||
if | ||
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] && | ||
[[ $(show mux status | grep active | wc -l) > 0 ]]; | ||
then | ||
logger -t TSA -p user.info "Toggle all mux mode to standby" | ||
sudo config mux mode standby all | ||
fi | ||
|
||
/usr/bin/TS TSA | ||
echo "Please execute 'config save' to preserve System mode in Maintenance after reboot or config reload" |
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,17 +1,11 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$(sonic-cfggen -d -v BGP_DEVICE_GLOBAL.STATE.tsa_enabled)" == "false" ]]; then | ||
echo "System is already in Normal mode" | ||
logger -t TSB -p user.info "System is already in Normal mode" | ||
else | ||
# toggle the mux to auto if dualtor | ||
if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]]; | ||
then | ||
logger -t TSB -p user.info "Toggle all mux mode to auto" | ||
sudo config mux mode auto all | ||
fi | ||
|
||
/usr/bin/TS TSB | ||
echo "Please execute 'config save' to preserve System mode in Normal state after reboot or config reload" | ||
# toggle the mux to auto if dualtor | ||
if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]]; | ||
then | ||
logger -t TSB -p user.info "Toggle all mux mode to auto" | ||
sudo config mux mode auto all | ||
fi | ||
|
||
/usr/bin/TS TSB | ||
echo "Please execute 'config save' to preserve System mode in Normal state after reboot or config reload" |
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