[PMON HLD] update get_reboot_cause mechanism and add get_midplane_dow…#2385
Open
chartsai-nvidia wants to merge 1 commit into
Open
[PMON HLD] update get_reboot_cause mechanism and add get_midplane_dow…#2385chartsai-nvidia wants to merge 1 commit into
chartsai-nvidia wants to merge 1 commit into
Conversation
…n_reason The commit updates 2 main parts: - when to run get_reboot_cause - get_midplane_down_reason Signed-off-by: Charles Tsai <chartsai@nvidia.com>
Collaborator
|
/azp run |
|
No pipelines are associated with this pull request. |
dgsudharsan
approved these changes
Jun 12, 2026
gpunathilell
approved these changes
Jun 22, 2026
vvolam
reviewed
Jun 23, 2026
| * Each DPU SONiC publishes a `boot_id` (a fresh UUID generated per boot from `/proc/sys/kernel/random/boot_id`) into its `DPU_STATE` entry in CHASSIS_STATE_DB. The NPU chassisd compares the reported `boot_id` against the last `boot_id` it persisted, when they differ a real DPU boot occurred, so chassisd calls `get_reboot_cause()` when midplane down transitions to up, records the cause to DB and json, and updates the persisted `boot_id`. | ||
| * The get_reboot_cause will return the current reboot-cause of the module. | ||
| * For persistent storage of the DPU reboot-cause and reboot-cause-history files use the existing mechanism and host storage path under "/host/reboot-cause/module/dpux". | ||
| * For persistent storage of the DPU reboot-cause and reboot-cause-history files use the existing mechanism and host storage path under "/host/reboot-cause/module/dpux". The boot_id is also stored in this file. |
Contributor
There was a problem hiding this comment.
Do you refer storing a boot_id file under the same dir?
Author
There was a problem hiding this comment.
The boot_id is stored in an additional field in the reboot-cause JSON.
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.
Why I did it
Refines the SmartSwitch PMON HLD for DPU reboot-cause and midplane-down handling:
only by an offline→online transition. Now the cause is captured only when the midplane is online,
using a per-boot
boot_idso chassisd reliably detects a real DPU reboot.get_midplane_down_reason()platform API and documents planned vs. unplanned midplane-downreasons.
Work item tracking
How I did it
boot_id: the DPU publishes a fresh per-boot UUID intoCHASSIS_STATE_DB; the NPU chassisd compares it to the last persisted value and calls
get_reboot_cause()only on a real reboot with midplane up.boot_idto theREBOOT_CAUSEandDPU_STATEschema examples.up→downmidplane handling (planned via transition flag vs. unplanned viaget_midplane_down_reason()) and added the new API definition.How to verify it