-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for persistent storage and retrieval of DPU reboot-cause #169
base: master
Are you sure you want to change the base?
Conversation
scripts/process-reboot-cause
Outdated
@@ -69,6 +70,45 @@ def read_reboot_cause_files_and_save_state_db(): | |||
x = TIME_SORTED_FULL_REBOOT_FILE_LIST[i] | |||
os.remove(x) | |||
|
|||
def read_dpu_reboot_cause_files_and_save_chassis_state_db(): | |||
# Get platform using device_info.get_platform() | |||
platform_info = device_info.get_platform_info() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code to query DPUs from the platform.json should be part of src/sonic-py-common/sonic_py_common/device_info.py
. There is an implementation for getting the get_num_dpus, so we can put something like get_dpus_info
. This will prevent a code duplication in all places that need to access DPUs information
|
||
# Assert that makedirs was called for the DPU directories | ||
mock_makedirs.assert_any_call(os.path.join('/host/reboot-cause/module', 'dpu0')) | ||
mock_makedirs.assert_any_call(os.path.join('/host/reboot-cause/module', 'dpu1')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read_dpu_reboot_cause_files_and_save_chassis_state_d
is not covered by the tests. Please new test for it.
hardware implementation requirements
466b70d
to
17345aa
Compare
Adding support for persistent storage and retrieval of DPU reboot-cause