Skip to content

[FRR] fix FRR mgmtd losing configuration issue#22182

Closed
yxieca wants to merge 1 commit intosonic-net:masterfrom
yxieca:frr-mgmtd
Closed

[FRR] fix FRR mgmtd losing configuration issue#22182
yxieca wants to merge 1 commit intosonic-net:masterfrom
yxieca:frr-mgmtd

Conversation

@yxieca
Copy link
Contributor

@yxieca yxieca commented Mar 30, 2025

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
  • Microsoft ADO (number only): 31872199

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)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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)

@yxieca yxieca requested a review from lguohan as a code owner March 30, 2025 18:00
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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>
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca closed this Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants