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

[mux] Exit to write standby state to active-active ports #11821

Merged
merged 3 commits into from
Aug 31, 2022

Conversation

lolyu
Copy link
Contributor

@lolyu lolyu commented Aug 23, 2022

Why I did it

After stopping the mux container, show mux status returns active for active-active ports, which should be in standby state.

Signed-off-by: Longxiang Lyu [email protected]

How I did it

Let mux exit by calling write_standby.py with args to write standby for active-active ports.

How to verify it

Stop mux container and verify active-active ports are in standby.

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

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

Description for the changelog

Link to config_db schema for YANG module changes

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

@lolyu lolyu requested a review from lguohan as a code owner August 23, 2022 10:24
@lolyu lolyu changed the title [mux] Exit to write standby state to active-active ports [mux] Exit to write standby state to active-active ports Aug 23, 2022
@zjswhhh
Copy link
Contributor

zjswhhh commented Aug 23, 2022

Maybe need to do the same thing for bgp service:

ExecStopPost=/usr/local/bin/write_standby.py

lolyu added a commit to sonic-net/sonic-mgmt that referenced this pull request Aug 24, 2022
Approach
What is the motivation for this PR?
Enable test_heartbeat_failure.py for active-active mux ports.

How did you do it?
How did you verify/test it?
The test cases now fails because of sonic-net/sonic-buildimage#11821
Signed-off-by: Longxiang Lyu <[email protected]>
@lolyu lolyu force-pushed the aa_mux_exit_standby branch from b19f322 to d885c66 Compare August 24, 2022 14:12
@yxieca
Copy link
Contributor

yxieca commented Aug 24, 2022

We should also pass in the module name, in this case 'mux', to the write class, so that it could check if we are warm restarting mux docker.

You might want to change the parameter to --shutdown <mux|bgp> so it ready for BGP for the next PR>

@lolyu
Copy link
Contributor Author

lolyu commented Aug 25, 2022

We should also pass in the module name, in this case 'mux', to the write class, so that it could check if we are warm restarting mux docker.

You might want to change the parameter to --shutdown <mux|bgp> so it ready for BGP for the next PR>

write_standby.py checks if it is warm restart before writing the configs:

if self.is_warmrestart:

@lolyu
Copy link
Contributor Author

lolyu commented Aug 30, 2022

Hi, @yxieca, updated, please take a review, thanks!

@yxieca yxieca merged commit 6e878a3 into sonic-net:master Aug 31, 2022
yxieca pushed a commit that referenced this pull request Sep 1, 2022
[mux] Exit to write standby state to `active-active` ports

Signed-off-by: Longxiang Lyu <[email protected]>
qiluo-msft pushed a commit that referenced this pull request Oct 3, 2022
[mux] Exit to write standby state to `active-active` ports

Signed-off-by: Longxiang Lyu <[email protected]>
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
…t#6211)

Approach
What is the motivation for this PR?
Enable test_heartbeat_failure.py for active-active mux ports.

How did you do it?
How did you verify/test it?
The test cases now fails because of sonic-net/sonic-buildimage#11821
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