[202012] Add support for reconciliation after warm restart (#76)#97
Merged
zjswhhh merged 1 commit intosonic-net:202012from Jul 21, 2022
Merged
[202012] Add support for reconciliation after warm restart (#76)#97zjswhhh merged 1 commit intosonic-net:202012from
zjswhhh merged 1 commit intosonic-net:202012from
Conversation
Description of PR Summary: Fixes # (issue) This PR is to add support for linkmgrd process reconciliation after warm restart. 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? One step of warm reboot procedure for dual ToR is to config the switch into manual mode. Before warm reboot finalizer executes config save, we want to config the switch back into auto mode, so config_db.json will be consistent before and after the reboot. How did you do it? When linkmgrd is initializing, get the systemwide warm reboot flag from WARM_RESTART_ENABLE_TABLE. If flag == true, start a reconciliation timer. Maintenance a mux port count based on MUX_CABLE|PORTNAME count. When one port completes reconciliation, if warm restart flag == true, config it back into auto mode, reduce reconciliation port count by 1. If reconciliation timer expires or port count == 0, set state to reconciled in WARM_RESTART_TABLE|linkmgrd. How did you verify/test it? Unit tests Tested on dual ToR testbed. Ports were auto mode after warm restart completed. Entry WARM_RESTART_TABLE|linkmgrd was added as expected.
vaibhavhd
approved these changes
Jul 21, 2022
yxieca
approved these changes
Jul 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Picking up commit below from master branch:
9044962 Jing Zhang Mon Jul 18 15:38:04 2022 -0700 Add support for reconciliation after warm restart (#76)#76
Description of PR
Summary:
Fixes # (issue)
This PR is to add support for linkmgrd process reconciliation after warm restart.
sign-off: Jing Zhang zhangjing@microsoft.com
Type of change
Approach
What is the motivation for this PR?
One step of warm reboot procedure for dual ToR is to config the switch into
manualmode. Before warm reboot finalizer executesconfig save, we want to config the switch back intoautomode, soconfig_db.jsonwill be consistent before and after the reboot.How did you do it?
WARM_RESTART_ENABLE_TABLE. If flag == true, start a reconciliation timer.MUX_CABLE|PORTNAMEcount. When one port completes reconciliation, if warm restart flag == true, config it back intoautomode, reduce reconciliation port count by 1.reconciledinWARM_RESTART_TABLE|linkmgrd.How did you verify/test it?
automode after warm restart completed. EntryWARM_RESTART_TABLE|linkmgrdwas added as expected.Any platform specific information?
Documentation