Skip to content

Commit

Permalink
[active-standby] reset mux probing backoff factor in link flaps (#245)
Browse files Browse the repository at this point in the history
Description of PR
Summary:
Fixes # (issue)

This PR is to address consistency in PXE boot scenario. In PXE boot, there is no ICMP heartbeats. During booting up, standby might switch to active. Mux probing is now the only way to find out mux toggles. But it's also expected to see mux probing fail when link is down, backoff factor can already be maximum when link is up.

If we don't reset backoff factor, it might take ~40s for peer to correct the inconsistency.

sign-off: Jing Zhang [email protected]
  • Loading branch information
zjswhhh authored Mar 14, 2024
1 parent 74c33ea commit dd61844
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/link_manager/LinkManagerStateMachineActiveStandby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@ void ActiveStandbyStateMachine::handleStateChange(LinkStateEvent &event, link_st
// There is a problem with this approach as it will hide link flaps that result in lost heart-beats.
initLinkProberState(nextState, true);
// enterMuxWaitState(nextState);

// reset mux probing backoff factor when link goes up
mMuxUnknownBackoffFactor = 1;
} else if (ls(mCompositeState) == link_state::LinkState::Up &&
ls(nextState) == link_state::LinkState::Down &&
ms(mCompositeState) != mux_state::MuxState::Label::Standby) {
Expand All @@ -575,6 +578,10 @@ void ActiveStandbyStateMachine::handleStateChange(LinkStateEvent &event, link_st

mActiveUnknownUpCount = 0;
mStandbyUnknownUpCount = 0;

mWaitActiveUpCount = 0;
mWaitStandbyUpBackoffFactor = 1;
mUnknownActiveUpBackoffFactor = 1;
} else {
mStateTransitionHandler[ps(nextState)][ms(nextState)][ls(nextState)](nextState);
}
Expand Down

0 comments on commit dd61844

Please sign in to comment.