[FRR] fix FRR mgmtd losing configuration issue#22182
Closed
yxieca wants to merge 1 commit intosonic-net:masterfrom
Closed
[FRR] fix FRR mgmtd losing configuration issue#22182yxieca wants to merge 1 commit intosonic-net:masterfrom
yxieca wants to merge 1 commit intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
11 tasks
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
2 tasks
mgmtd configuration management has an issue where any session can clean up outstanding configuration upon destruction. When a long-lived session is taking configuration changes, and another short-lived session which never took any configuration closes, the outstanding configuration would be lost because the configuration clearing doesn't have protection during session closing. This change keeps track if a session has received any configuration, and if the configuration has been applied or cleared. The outstanding configuration should be applied or cleared before session closure (assertion). When clearing the outstanding session structure, only attempt to clear configuration when the closing session has outstanding configurations. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Why I did it
mgmtd configuration management has an issue where any session can clean up outstanding configuration upon destruction.
When a long-lived session is taking configuration changes, and another short-lived session which never took any configuration closes, the outstanding configuration would be lost because the configuration clearing doesn't have protection during session closing.
Work item tracking
How I did it
This change keeps track if a session has received any configuration, and if the configuration has been applied or cleared.
The outstanding configuration should be applied or cleared before session closure (assertion).
When clearing the outstanding session structure, only attempt to clear configuration when the closing session has outstanding configurations.
How to verify it
Run config reload test on a platform with wimpy CPU, with turning on excessive debug output, the repro rate was >80%. With the fix 100% passing. The fix also has assertion to make sure that no configuration leak would go undetected.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)