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

Reset link prober state when default route is back #56

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

zjswhhh
Copy link
Contributor

@zjswhhh zjswhhh commented Apr 1, 2022

Description of PR

Summary:
Fixes # (issue)

This PR is to address the edge case that when both sides are missing default route, and standby side gets default route back. Expected behavior is standby side will switch to active. But if standby side is wait state when link prober is restarted, the switchover won't happen.

sign-off: Jing Zhang zhangjing@microsoft.com

Type of change

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

Approach

What is the motivation for this PR?

When both sides are missing default route AND standby side gets default route back, we want to ensure the standby side will take over and switch to active.

How did you do it?

Re-initialize link prober state when default route goes from na to ok.

How did you verify/test it?

Tested below scenarios:

  1. Active side missing default route.
  2. Both sides missing default route one after another.
  3. Both sides missing default route, standby side get it back.

Any platform specific information?

Documentation

@zjswhhh zjswhhh requested review from lolyu and yxieca April 1, 2022 21:29
@qiluo-msft
Copy link

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

@zjswhhh
Copy link
Contributor Author

zjswhhh commented Apr 15, 2022

Hi @qiluo-msft - can you try cherry-pick this PR again. I merged a PR into 202012 earlier, it should resolve the conflict.

zjswhhh added a commit to sonic-net/sonic-buildimage that referenced this pull request Apr 17, 2022
[master][sonic-linkmgrd] submodule updates

41f5fb9 Jing Zhang      Mon Apr 11 08:33:39 2022 -0700  Upgrade linkmgrd to `BULLSEYE` (sonic-net/sonic-linkmgrd#60)
2fc890e Jing Zhang      Mon Apr 4 10:25:22 2022 -0700   Lower unsolicited MUX state change notification log level to WARNING (sonic-net/sonic-linkmgrd#57)
13f4879 Jing Zhang      Sun Apr 3 21:56:33 2022 -0700   Keep incrementing sequence number when link prober is suspended and shutdown  (sonic-net/sonic-linkmgrd#55)
62482e1 Jing Zhang      Sun Apr 3 20:54:40 2022 -0700   Reset link prober state when default route is back (sonic-net/sonic-linkmgrd#56)
34a68d1 Jing Zhang      Thu Mar 31 18:33:46 2022 -0700  disable switchover measuring based on link prober (sonic-net/sonic-linkmgrd#49)
898a655 Jing Zhang      Thu Mar 31 15:42:15 2022 -0700  Update link prober metrics posting logics (sonic-net/sonic-linkmgrd#50)

sign-off: Jing Zhang zhangjing@microsoft.com
qiluo-msft pushed a commit that referenced this pull request Apr 20, 2022
### Description of PR
Summary:
Fixes # (issue)

This PR is to address the edge case that when both sides are missing default route, and standby side gets default route back. Expected behavior is standby side will switch to active. But if standby side is `wait` state when link prober is restarted, the switchover won't happen. 

sign-off: Jing Zhang zhangjing@microsoft.com

### Type of change
- [x] Bug fix

### Approach
#### What is the motivation for this PR?
When both sides are missing default route AND standby side gets default route back, we want to ensure the standby side will take over and switch to active. 

#### How did you do it?
Re-initialize link prober state when default route goes from `na` to `ok`. 

#### How did you verify/test it?
Tested below scenarios: 
1. Active side missing default route. 
2. Both sides missing default route one after another.
3. Both sides missing default route, standby side get it back.
zjswhhh added a commit to zjswhhh/sonic-linkmgrd that referenced this pull request Apr 20, 2022
### Description of PR
Summary:
Fixes # (issue)

This PR is to address the edge case that when both sides are missing default route, and standby side gets default route back. Expected behavior is standby side will switch to active. But if standby side is `wait` state when link prober is restarted, the switchover won't happen. 

sign-off: Jing Zhang zhangjing@microsoft.com

### Type of change
- [x] Bug fix

### Approach
#### What is the motivation for this PR?
When both sides are missing default route AND standby side gets default route back, we want to ensure the standby side will take over and switch to active. 

#### How did you do it?
Re-initialize link prober state when default route goes from `na` to `ok`. 

#### How did you verify/test it?
Tested below scenarios: 
1. Active side missing default route. 
2. Both sides missing default route one after another.
3. Both sides missing default route, standby side get it back.
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.

3 participants