-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Changes to support other SpineRouter roles #22337
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
Changes from all commits
b811d70
9d857d4
b41cff8
133128f
5c9109e
ea9514b
ae48dc8
95b38cf
a58ed73
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Comment on lines
-61
to
-70
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line 62 was only applicable for rexec-based TSA where we were passing "TSA chassis" from sup. It is no longer needed.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TSA from sup can still be done by DRI on sup
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rlhui - no functional change to TSA from sup in this PR. This is just code cleanup while printing warning message on linecard. Instead of using Spinerouter to identify linecard, we have switched to using subtype UpsteamLC/DownstreamLC |
||
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Comment on lines
-60
to
-66
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove this ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is some previous code cleanup issue. It is the same message being printed in all cases, so removed the conditional check |
||
| 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 |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| { | ||
| "CONFIG_DB__DEVICE_METADATA": { | ||
| "localhost": { | ||
| "type": "SpineRouter" | ||
| "type": "SpineRouter", | ||
| "switch_type": "voq" | ||
| } | ||
| } | ||
| } |
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.
subtype may not be defined for all sonic SpineRouter sku's?
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.
This is mainly used for reliable TSA from supervisor on modular chassis.
subtype is being used to check if the device is a linecard (UpstreamLC/DownstreamLC). If not set, assumption is that it is not a linecard.