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

Reliable TSA implementation #18928

Merged
merged 3 commits into from
May 31, 2024
Merged

Reliable TSA implementation #18928

merged 3 commits into from
May 31, 2024

Conversation

fountzou
Copy link
Contributor

@fountzou fountzou commented May 9, 2024

Why I did it

Implementing Reliable TSA feature as described in the HLD doc

Work item tracking
  • Microsoft ADO (number only):

How I did it

A new attribute "tsa_enabled" has been added in CHASSIS_APP_DB the value of which changes whenever TSA/TSB is issued in the supervisor (default value is false). bgpcfgd subscribes to CHASSIS_APP_DB to receive updates on the newly added "tsa_enabled" attribute and in conjunction with the CONFIG_DB "tsa_enabled" attribute value, determine the BGP operational state is determined to be in TSA or TSB.

How to verify it

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)

Signed-off-by: fountzou <ioannis.fountzoulas@nokia.com>
Copy link

linux-foundation-easycla bot commented May 9, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@fountzou
Copy link
Contributor Author

@StormLiangMS / @lguohan Could you please restart the Azure pipeline?

@rlhui rlhui requested a review from abdosi May 15, 2024 17:57
@rlhui rlhui added the P0 Priority of the issue label May 15, 2024
@fountzou
Copy link
Contributor Author

/azp run Azure.sonic-buildimage

Copy link

Commenter does not have sufficient privileges for PR 18928 in repo sonic-net/sonic-buildimage

@judyjoseph judyjoseph added the Chassis 🤖 Modular chassis support label May 24, 2024
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.

as comments

src/sonic-bgpcfgd/bgpcfgd/managers_device_global.py Outdated Show resolved Hide resolved
files/build_templates/docker_image_ctl.j2 Show resolved Hide resolved
dockers/docker-fpm-frr/base_image_files/TS Show resolved Hide resolved
dockers/docker-fpm-frr/base_image_files/TSA Show resolved Hide resolved
dockers/docker-fpm-frr/base_image_files/TSB Show resolved Hide resolved
@arlakshm
Copy link
Contributor

/Azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: fountzou <ioannis.fountzoulas@nokia.com>
@arlakshm
Copy link
Contributor

/Azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).


if [[ -f /etc/sonic/chassisdb.conf ]]; then
tsa_cfg="$(sonic-db-cli CONFIG_DB HGET "BGP_DEVICE_GLOBAL|STATE" "tsa_enabled")"
sonic-db-cli CHASSIS_APP_DB HMSET "BGP_DEVICE_GLOBAL|STATE" tsa_enabled ${tsa_cfg}
Copy link
Contributor

Choose a reason for hiding this comment

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

is it ok to write APP_DB in this way ? Generally we use swssconfig to regular APP DB ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there is no concern, it is consistent with the existing approach. --There are several example in sonic-utilities, e.g.,

scripts/route_check_test.sh:    sonic-db-cli -n asic0 APPL_DB hmset "ROUTE_TABLE:20c0:d9b8:99:80::/64" "nexthop" "fc00::72,fc00::76,fc00::7a,fc00::7e" "ifname" "PortChannel01,PortChannel02,PortChannel03,PortChannel04" > /dev/null
scripts/route_check_test.sh:    sonic-db-cli -n asic0 ASIC_DB hmset "ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY:{\"dest\":\"192.193.120.255/25\",\"switch_id\":\"oid:0x21000000000000\",\"vr\":\"oid:0x3000000000022\"}" "SAI_ROUTE_ENTRY_ATTR_NEXT_HOP_ID" "oid:0x5000000000614" > /dev/null

arlakshm
arlakshm previously approved these changes May 30, 2024
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

Copy link
Contributor

@abdosi abdosi left a comment

Choose a reason for hiding this comment

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

LGTM

@rlhui rlhui merged commit 9d5fb20 into sonic-net:master May 31, 2024
9 of 11 checks passed
bingwang-ms added a commit that referenced this pull request Jun 2, 2024
@bingwang-ms
Copy link
Contributor

@fountzou I suspect the PR caused regression on Non-chassis platform. Can you please check? Thanks!

yxieca pushed a commit that referenced this pull request Jun 3, 2024
arun1355492 pushed a commit to arun1355492/sonic-buildimage that referenced this pull request Jul 26, 2024
* Reliable TSA implementation

---------

Signed-off-by: fountzou <ioannis.fountzoulas@nokia.com>
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
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants