[202211] chassisd: Fix crash on exit on linecard#352
Merged
gechiang merged 2 commits intosonic-net:202211from Jul 19, 2023
Merged
[202211] chassisd: Fix crash on exit on linecard#352gechiang merged 2 commits intosonic-net:202211from
gechiang merged 2 commits intosonic-net:202211from
Conversation
gechiang
approved these changes
May 5, 2023
Collaborator
|
@StormLiangMS to merge for 202211 |
* Fix to explicit stop the config_manager * Add tests for chassisd run method.
Set the `config_manager` variable to `None` if we are running on a linecard and thus don't need to set up the config manager. During cleanup, the chassid service tries to clean up the `config_manager`, but the `config_manager` variable is only ever initialized if we are on the supervisor. Thus, checking if it is `None` is insufficient because this results in an `UnboundLocalError` that prevents the cleanup from succeeding on a linecard.
7e50670 to
cb4ad62
Compare
Contributor
Author
|
/azpw run Azure.sonic-platform-daemons |
Collaborator
|
/AzurePipelines run Azure.sonic-platform-daemons |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@arlakshm Test failure is due to a pipeline infra problem. Specifically, |
lotus-nexthop
pushed a commit
to lotus-nexthop/sonic-platform-daemons
that referenced
this pull request
Oct 28, 2025
…cation id (sonic-net#352) * Retrieve channel from CONFIG_DB to enable breakout support Signed-off-by: Mihir Patel <[email protected]> * Enhanced test_get_host_lane_assignment_option * Resolved test case failure * Addressed review comments --------- Signed-off-by: Mihir Patel <[email protected]>
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.
Description
Set the
config_managervariable toNoneif we are running on alinecard and thus don't need to set up the config manager.
Motivation and Context
During cleanup, the chassid service tries to clean up the
config_manager, but theconfig_managervariable is only everinitialized if we are on the supervisor. Thus, checking if it is
Noneis insufficient because this results in anUnboundLocalErrorthat prevents the cleanup from succeeding on a linecard.
How Has This Been Tested?
This has been tested via both the sonic-mgmt platform_tests test case
for the chassid daemon as well as the updated unit tests in this PR.
Additional Information
This is a cherry-pick of PR #347 to 202211 release branch. Note that
PR #328 is also backported to 202211 in this PR as it is required for the
unit test update to pass.