Skip to content

Conversation

@jianyuewu
Copy link
Contributor

Why I did it

Thermal data was being cleared at startup. we want it cleared on process exit to avoid wiping metrics on launch and ensure a clean shutdown behavior.

How I did it

Register an atexit callback that calls clean_thermal_data with the SFP list, removing the startup-time invocation.

How to verify it

UT and startup, shutdown test.

Which release branch to backport (provide reason below if selected)

  • 202511

Tested branch (Please provide the tested image version)

202511

Register atexit callback to clean thermal data on process shutdown.
Only cleanup SW control modules.

Signed-off-by: Jianyue Wu <jianyuew@nvidia.com>
@jianyuewu jianyuewu requested a review from lguohan as a code owner December 30, 2025 03:07
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jianyuewu jianyuewu changed the title Register thermal data cleanup at exit [Mellanox] register thermal data cleanup at exit Dec 30, 2025
@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).

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.

3 participants