Skip to content

[202211] chassisd: Fix crash on exit on linecard#352

Merged
gechiang merged 2 commits intosonic-net:202211from
patrickmacarthur:202211-fix-chassisd-crash
Jul 19, 2023
Merged

[202211] chassisd: Fix crash on exit on linecard#352
gechiang merged 2 commits intosonic-net:202211from
patrickmacarthur:202211-fix-chassisd-crash

Conversation

@patrickmacarthur
Copy link
Contributor

Description

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.

Motivation and Context

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.

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.

@patrickmacarthur patrickmacarthur changed the base branch from master to 202211 April 20, 2023 20:08
@prgeor
Copy link
Collaborator

prgeor commented May 5, 2023

@StormLiangMS to merge for 202211

@patrickmacarthur patrickmacarthur changed the title chassisd: Fix crash on exit on linecard [202211] chassisd: Fix crash on exit on linecard Jul 12, 2023
judyjoseph and others added 2 commits July 12, 2023 13:07
* 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.
@patrickmacarthur
Copy link
Contributor Author

/azpw run Azure.sonic-platform-daemons

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-platform-daemons

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kenneth-arista
Copy link

@arlakshm Test failure is due to a pipeline infra problem. Specifically,

No space left on device : '/home/vsts/work/1/target/b3eeaa0d-789f-4325-9cb3-90f2d8fab6d3.tmp'

@gechiang gechiang merged commit ea8e5c7 into sonic-net:202211 Jul 19, 2023
@patrickmacarthur patrickmacarthur deleted the 202211-fix-chassisd-crash branch August 2, 2023 18:47
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants