-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add ActiveActiveStateMachine
implementation
#64
Conversation
12e385d
to
a5af507
Compare
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
a5af507
to
9cf2ae9
Compare
Signed-off-by: Longxiang Lyu <[email protected]>
9cf2ae9
to
0b1c2e0
Compare
…pe port Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
For port in `active-active` port cable type, use `Wait` state as initial state. 1. Modify `Wait` state so it could change to `Unknown` state if port cable type is `active-active`. Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
1. Explicit inistantiate template function `postLinkProberEvent` to work for `IcmpSelfEvent` and `IcmpPeerEvent`. 2. Use lambda functions to call `processEvent` instead of with `boost::bind`, so it could use those overloads of `processEvent`. Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Longxiang Lyu <[email protected]>
8608abe
to
83ddb52
Compare
Signed-off-by: Longxiang Lyu <[email protected]>
Add a mux prober timer `mDeadlineTimer`, so that, after a mux probe, if linkmgrd didn't receives a valid mux state probe response as either active or standby, it will tries to probe again. Signed-off-by: Longxiang Lyu <[email protected]>
if (errorCode == boost::system::errc::success) { | ||
if (ms(mCompositeState) == mux_state::MuxState::Label::Unknown || | ||
ms(mCompositeState) == mux_state::MuxState::Label::Error || | ||
ms(mCompositeState) == mux_state::MuxState::Label::Wait) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought we got rid of Wait
in active-active?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Wait
will only occur in the initial state (Wait, Wait, Down)
mDeadlineTimer.cancel(); | ||
startMuxWaitTimer(); | ||
} else { | ||
probeMuxState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if in non-auto mode, and probing back a mux state that is different than mux mode, will we switch to match mux mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the question is, is mux mode a "must-be" or a "preference"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the mux mode is more like a one-time-off setting, after setting the mux mode, linkmgrd
now assumes the toggle must be a success, and won't react to any more state changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it make more sense in active-active
to keep mux state aligned with mux mode? But we can leave it as same as active-standby
(one-time setting) for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
Add link manager state machine
ActiveActiveStateMachine
to work if the port is inactive-active
cable type.How did you do it?
Add
ActiveActiveStateMachine
to cover the following scenarions:How did you verify/test it?
Add unittests to cover the above scenarios.
Any platform specific information?
Documentation