Skip to content

[process-reboot-cause] Save boot_id and device fields for DPU reboot cause#405

Open
chartsai-nvidia wants to merge 1 commit into
sonic-net:masterfrom
chartsai-nvidia:chartsai/pmon-hld-update
Open

[process-reboot-cause] Save boot_id and device fields for DPU reboot cause#405
chartsai-nvidia wants to merge 1 commit into
sonic-net:masterfrom
chartsai-nvidia:chartsai/pmon-hld-update

Conversation

@chartsai-nvidia

Copy link
Copy Markdown

Why I did it

DPU reboot-cause entries written to CHASSIS_STATE_DB were missing the boot_id and
device fields, so consumers couldn't correlate a DPU reboot with its boot instance or
source device. NPU entries are unaffected.

Work item tracking
  • Microsoft ADO (number only): N/A

How I did it

  • Defined NPU_REBOOT_CAUSE_DB_FIELDS (cause, time, user, comment) and
    DPU_REBOOT_CAUSE_DB_FIELDS (adds boot_id, device) in process-reboot-cause.
  • Replaced the hardcoded per-field db.set calls with a loop over the field set
    selected by device type, so DPU rows now include boot_id and device.

How to verify it

  • Run the unit tests: tests/process-reboot-cause_test.py now asserts that a DPU
    reboot-cause file results in boot_id and device being written to
    CHASSIS_STATE_DB.

Signed-off-by: Charles Tsai <chartsai@nvidia.com>
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

3 similar comments
@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants