[Mellanox] Implement get_midplane_down_reason for DPU module - #28227
[Mellanox] Implement get_midplane_down_reason for DPU module#28227chartsai-nvidia wants to merge 2 commits into
Conversation
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-buildimage |
|
Retrying failed(or canceled) jobs... |
|
Build not found. Please close and reopen the PR or rebase your branch to trigger a new build. |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/azpw retry |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1165748: ✅Stage Build:
|
|
/azpw retry |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1165748: ✅Stage Build:
|
|
/azpw retry |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1165748: ✅Stage Build:
|
|
This PR has backport request label(s) for branch(es): 202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202605: <test result>) in the Test result section as well in your PR description. ---Powered by SONiC BuildBot
|
b879f2c
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
add tests Signed-off-by: Charles Tsai <chartsai@nvidia.com>
Signed-off-by: Charles Tsai <chartsai@nvidia.com>
b879f2c to
421be44
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/azpw ms_conflict |
Why I did it
Mellanox
DpuModuledid not implement the pmonModuleBase.get_midplane_down_reason()interface, so it fell back to the generic base behavior instead of reporting the actual DPU
hardware reset cause. As a result, when a DPU's midplane went down there was no way for pmon to
surface whether it was caused by a power loss, a thermal shutdown, or a reset from the main board.
Work item tracking
How I did it
DpuModule.get_midplane_down_reason()inplatform/mellanox/mlnx-platform-api/sonic_platform/module.py.reboot_cause_map(the per-DPU/var/run/hw-management/<dpu>/system/reset_*sysfs files) and returns the(ChassisBase.REBOOT_CAUSE_*, description)tuple of the first file that reads1.(ChassisBase.REBOOT_CAUSE_NON_HARDWARE, '')when no reset-cause file isasserted, matching the existing
get_reboot_cause()contract.ChassisBase.REBOOT_CAUSE_*constants rather than introducing newmidplane-specific constants.
How to verify it
Run the Mellanox platform API unit tests:
cd platform/mellanox/mlnx-platform-api python3 -m pytest tests/test_module.py::TestModule::test_dpu_module -vWhich release branch to backport (provide reason below if selected)
Description for the changelog
Implement get_midplane_down_reason for Mellanox DPU module