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

[active-standby] Fix extra toggle observed in config reload #216

Merged
merged 5 commits into from
Aug 11, 2023

Conversation

lolyu
Copy link
Contributor

@lolyu lolyu commented Aug 8, 2023

Description of PR

Summary:
Fixes #217

Type of change

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

Approach

What is the motivation for this PR?

Fix the issue that an extra mux toggle is observed when the standby ToR does a config reload.
Two reasons:

  1. extra toggle due to link prober init to unknown when the mux is wait
    The state transitions are:
    (unknown, standby, down) -- activate state machine -->
    (standby, standby, down) --> link prober unknown -->
    (unknown, standby, down) --> enter mux wait and probe mux -->
    (unknown, wait, down) --> port up -->
    (unknown, wait, up) --> mux probe standby -->
    (unknown, standby, up) --> toggle to active

  2. extra toggle due to the port up event arriving within the link prober unknown detection period

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

Work item tracking
  • Microsoft ADO (number only): 24794476

How did you do it?

  1. when the port up and init the link prober state, init the link prober state to wait when the mux state is wait
  2. reset the link prober state when port up to refresh the detection.

How did you verify/test it?

UT

Any platform specific information?

Documentation

@lolyu lolyu force-pushed the fix_extra_toggle_standby_config_reload branch from 9cf11dd to f671b7d Compare August 8, 2023 10:26
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
@lolyu lolyu marked this pull request as ready for review August 9, 2023 07:21
@lolyu lolyu requested review from zjswhhh and yxieca August 9, 2023 08:45
@yxieca yxieca self-requested a review August 11, 2023 00:25
@lolyu lolyu merged commit b0adf57 into sonic-net:master Aug 11, 2023
8 checks passed
StormLiangMS pushed a commit that referenced this pull request Aug 14, 2023
Approach
What is the motivation for this PR?
Fix the issue that an extra mux toggle is observed when the standby ToR does a config reload.
Two reasons:

1. extra toggle due to link prober init to unknown when the mux is wait
The state transitions are:
(unknown, standby, down) -- activate state machine -->
(standby, standby, down) --> link prober unknown -->
(unknown, standby, down) --> enter mux wait and probe mux -->
(unknown, wait, down) --> port up -->
(unknown, wait, up) --> mux probe standby -->
(unknown, standby, up) --> toggle to active

2. extra toggle due to the port up event arriving within the link prober unknown detection period

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

Work item tracking
Microsoft ADO (number only): 24794476
How did you do it?
when the port up and init the link prober state, init the link prober state to wait when the mux state is wait
reset the link prober state when port up to refresh the detection.
How did you verify/test it?
UT
yxieca pushed a commit that referenced this pull request Sep 6, 2023
Approach
What is the motivation for this PR?
Fix the issue that an extra mux toggle is observed when the standby ToR does a config reload.
Two reasons:

1. extra toggle due to link prober init to unknown when the mux is wait
The state transitions are:
(unknown, standby, down) -- activate state machine -->
(standby, standby, down) --> link prober unknown -->
(unknown, standby, down) --> enter mux wait and probe mux -->
(unknown, wait, down) --> port up -->
(unknown, wait, up) --> mux probe standby -->
(unknown, standby, up) --> toggle to active

2. extra toggle due to the port up event arriving within the link prober unknown detection period

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

Work item tracking
Microsoft ADO (number only): 24794476
How did you do it?
when the port up and init the link prober state, init the link prober state to wait when the mux state is wait
reset the link prober state when port up to refresh the detection.
How did you verify/test it?
UT
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.

[active-standby] Extra toggle observed after the standby ToR config reload.
5 participants