-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update process-reboot-cause to save the reboot-cause to state-db #5562
Conversation
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.
If we go with this approach, we might want to consider naming the first service "determine-reboot-cause" and the second service "process-reboot-cause", or similar. It's more meaningful than "post-process-reboot-cause".
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.
Now that there are two services, I suggest renaming the directory from files/image_config/process-reboot-cause
to files/image_config/reboot-cause
retest mellanox please! |
@jleveque Can you review this again? |
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.
Today I merged new changes to create two new packages, sonic-host-services
and sonic-host-services-data
Can you please move the determine-reboot-cause
and process-reboot-cause
scripts into the former and move the service files into the latter?
See here: #5694
Note that you will also need to make sure the scripts are Python 3-compliant
@jleveque I can open a new PR for the migration to sonic-host-service package after I submitting this PR. |
retest broadcom please |
1 similar comment
retest broadcom please |
…5784) - Convert docker-wait-any script to Python 3 - Install Python 3 Docker Engine API in host OS
@@ -0,0 +1,98 @@ | |||
#!/usr/bin/env python |
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.
Please change shebang to #!/usr/bin/env python3
and ensure script is Python 3-compliant.
…c-buildimage into reboot-cause-tel
will open a new PR after rebase. |
- Why I did it
To make the reboot cause history information available for telemetry service, during processing the reboot-cause on boot, the information is saved in state-db.
- How I did it
Split the
process-reboot-cause service
into two services:determine-reboot-cause
andprocess-reboot-cause
Determine the reboot-cause based on the hardware/software reboot-cause information and save it into a file with time stamp when it's determined.
Read the saved reboot-cause files up to 10 files (after time-sorted) from "/host/reboot-cause/history" directory and save them to state-db.
- How to verify it
Tested in DUT using Cli commands ( introduced and modified with this PR : Add
show reboot-history
sonic-utilities#1154) and check the state-db with redis-cli.- Which release branch to backport (provide reason below if selected)
- Description for the changelog
HLD : sonic-net/SONiC#669
- A picture of a cute animal (not mandatory but encouraged)