Add ActiveActiveStateMachine implementation#64
Conversation
12e385d to
a5af507
Compare
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
a5af507 to
9cf2ae9
Compare
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
9cf2ae9 to
0b1c2e0
Compare
…pe port Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
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 <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
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 <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
8608abe to
83ddb52
Compare
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
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 <lolv@microsoft.com>
| 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.
Thought we got rid of Wait in active-active?
There was a problem hiding this comment.
Yes, Wait will only occur in the initial state (Wait, Wait, Down)
| mDeadlineTimer.cancel(); | ||
| startMuxWaitTimer(); | ||
| } else { | ||
| probeMuxState(); |
There was a problem hiding this comment.
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.
I guess the question is, is mux mode a "must-be" or a "preference"?
There was a problem hiding this comment.
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.
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.
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
Add link manager state machine
ActiveActiveStateMachineto work if the port is inactive-activecable type.How did you do it?
Add
ActiveActiveStateMachineto cover the following scenarions:How did you verify/test it?
Add unittests to cover the above scenarios.
Any platform specific information?
Documentation