Skip to content
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

Linecard startup-TSA-TSB #18496

Merged
merged 3 commits into from
May 29, 2024
Merged

Conversation

saksarav-nokia
Copy link
Contributor

Why I did it

The traffic loss is seen when the chassis or Linecard is rebooted . Cloning the sonic-net/sonic-buildimage-msft#206 to master

Work item tracking
  • Microsoft ADO (number only):

How I did it

Start a service startup_tsa_tsb.service when the IMM comes up
This service configures TSA and starts a timer which is provided in device/startup-tsa-tsb.conf for every platform. This service will exit with NOP if the platform doesn't have startup-tsa-tsb.conf in the device folder.
If the CONFIG_DB has TSA configured already, the service will exit.
When the timer expires, TSB is configured
Enhanced "sudo TSC" command output to indicate TSB pending with the remaining timer value and service name if the service is running
If the operator issues "sudo TSA" explicitly while the startup_tsa_tsb.service is running, service will be stopped.

How to verify it

Verified that the service is started only in IMM
Verified that the service runs only if device/startup-tsa-tsb.conf file exists
Verified that the TSA is configured and routes are not advertised to eBGP neighbors till TSB timer expires and TSB is configured.
"sudo TSC" shows the TSB Pending with remaining timer interval
Service is stopped when the operator issues "sudo TSA"

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@saksarav-nokia
Copy link
Contributor Author

@sanjair-git for viz

@saksarav-nokia
Copy link
Contributor Author

@rlhui @arlakshm @judyjoseph @abdosi @deepak-singhal0408 Created this PR for master

@@ -0,0 +1,15 @@
[Unit]
Description= STARTUP TSA-TSB SERVICE
Requires=updategraph.service database.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updategraph service is a 202205 only service which in 202405 is replaced by config-setup service. May need to change this accordingly.

…art a timer to configure TSB and configure TSB when the timer expires

Signed-off-by: saksarav <sakthivadivu.saravanaraj@nokia.com>
…minigraph.service

Signed-off-by: saksarav <sakthivadivu.saravanaraj@nokia.com>
@saksarav-nokia
Copy link
Contributor Author

@gechiang , I have update the master PR with the fix

@saksarav-nokia
Copy link
Contributor Author

@abdosi , could you please restart the azure pipeline?

@saksarav-nokia saksarav-nokia changed the title start a new service to configure TSA as soon as Linecard comes up, start a timer to configure TSB and configure TSB when timer expires Automatic Linecard TSA May 15, 2024
@rlhui rlhui added the P0 Priority of the issue label May 15, 2024
@wumiaont
Copy link
Contributor

/azpw run Azure.sonic-buildimage

@saksarav-nokia saksarav-nokia changed the title Automatic Linecard TSA Linecard startup-TSA-TSB May 17, 2024
@judyjoseph judyjoseph added the Chassis 🤖 Modular chassis support label May 24, 2024
@saksarav-nokia
Copy link
Contributor Author

@judyjoseph , @lguohan @abdosi , could you please review and merge it?

Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

return True;
else:
tsa_enabled = get_tsa_config("")
if tsa_enabled == 'false':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is tsa_enabled not returned as it is? The function return value is confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tejaswini, The startup-tsa-tsb service is global and the checks in get_tsa_status makes sure that the service is started only when the tsa_enabled flag is set to false for all namespaces in multi-asic and in the global config for pizza box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chassis 🤖 Modular chassis support P0 Priority of the issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants