Skip to content

Check self's mux mode before switching peer to standby & add support for detach mode #79

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

Merged
merged 3 commits into from
Jun 7, 2022

Conversation

zjswhhh
Copy link
Contributor

@zjswhhh zjswhhh commented May 19, 2022

Description of PR

Summary:
Fixes # (issue)
Make sure self ToR is in auto mode before switching peer to standby. Also add support for detach mode.

detach mode is equal to auto mode for SELF, but under this mode, ToR won't touch PEER's status.

sign-off: Jing Zhang [email protected]

Type of change

  • Bug fix
  • New feature
  • Doc/Design
  • Unit test

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Documentation

@zjswhhh zjswhhh requested a review from lolyu May 20, 2022 00:24
@zjswhhh zjswhhh changed the title Check self's mux mode before switching peer to standby Check self's mux mode before switching peer to standby & add support for detach mode May 20, 2022
@zjswhhh zjswhhh requested review from vdahiya12 and yxieca May 20, 2022 19:17
@lolyu
Copy link
Contributor

lolyu commented May 31, 2022

What is detach mode here for active-active, could you pls provide some details?

@zjswhhh
Copy link
Contributor Author

zjswhhh commented May 31, 2022

What is detach mode here for active-active, could you pls provide some details?

Updated PR description.

);
enterPeerMuxState(label);
mMuxPortPtr->setPeerMuxState(label);
startPeerMuxWaitTimer();

Choose a reason for hiding this comment

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

for the detach mode, could you please point , where is the actual logic to not query the peer ToR's gRPC API's ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently querying SELF & PEER is using a same DB table entry. Per offline discussion, will make another PR to separate in the future.

This PR only avoids setting PEER's state.

);
enterPeerMuxState(label);
mMuxPortPtr->setPeerMuxState(label);
startPeerMuxWaitTimer();

Choose a reason for hiding this comment

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

for the detach mode, could you please point , where is the actual logic to not query the peer ToR's gRPC API's ?

Copy link
Contributor

@lolyu lolyu left a comment

Choose a reason for hiding this comment

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

LGTM

@lolyu
Copy link
Contributor

lolyu commented Jun 7, 2022

/AZP run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zjswhhh zjswhhh merged commit 127fd3d into sonic-net:master Jun 7, 2022
@zjswhhh zjswhhh deleted the checkMuxMode branch June 7, 2022 16:33
yxieca pushed a commit that referenced this pull request Jun 9, 2022
…for `detach` mode (#79)

### Description of PR
Summary:
Fixes # (issue)
Make sure self ToR is in `auto` mode before switching peer to `standby`. Also add support for `detach` mode. 

`detach` mode is equal to `auto` mode for SELF, but under this mode, ToR won't touch PEER's status. 

sign-off: Jing Zhang [email protected]

### Type of change
- [x] Bug fix
- [x] New feature
zjswhhh added a commit to sonic-net/sonic-utilities that referenced this pull request Oct 7, 2022
What I did
Add support for config mux mode detach. Stemming from sonic-net/sonic-linkmgrd#79

sign-off: Jing Zhang [email protected]

How I did it
Add detach to the choice list.

How to verify it
Existing unit test.
Tested on DUT
EdenGri pushed a commit to EdenGri/sonic-utilities that referenced this pull request Oct 12, 2022
What I did
Add support for config mux mode detach. Stemming from sonic-net/sonic-linkmgrd#79

sign-off: Jing Zhang [email protected]

How I did it
Add detach to the choice list.

How to verify it
Existing unit test.
Tested on DUT
mdanish-kh pushed a commit to hamnarauf/sonic-utilities that referenced this pull request Oct 22, 2022
What I did
Add support for config mux mode detach. Stemming from sonic-net/sonic-linkmgrd#79

sign-off: Jing Zhang [email protected]

How I did it
Add detach to the choice list.

How to verify it
Existing unit test.
Tested on DUT
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this pull request Oct 25, 2022
What I did
Add support for config mux mode detach. Stemming from sonic-net/sonic-linkmgrd#79

sign-off: Jing Zhang [email protected]

How I did it
Add detach to the choice list.

How to verify it
Existing unit test.
Tested on DUT
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this pull request Nov 21, 2022
What I did
Add support for config mux mode detach. Stemming from sonic-net/sonic-linkmgrd#79

sign-off: Jing Zhang [email protected]

How I did it
Add detach to the choice list.

How to verify it
Existing unit test.
Tested on DUT
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this pull request Aug 3, 2023
What I did
Add support for config mux mode detach. Stemming from sonic-net/sonic-linkmgrd#79

sign-off: Jing Zhang [email protected]

How I did it
Add detach to the choice list.

How to verify it
Existing unit test.
Tested on DUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants