Skip to content
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

Make determine-reboot-cause into oneshot service #12628

Merged
merged 2 commits into from
Nov 12, 2022

Conversation

cytsao1
Copy link
Contributor

@cytsao1 cytsao1 commented Nov 7, 2022

Why I did it

"show reboot-cause history" does not report the latest reboot-cause because process-reboot-cause does not wait for determine-reboot-cause to complete running before it starts.
Currently the system just assumes that process-reboot-cause will run after determine-reboot-cause based on timing. This fix is fixing the race condition that might happen if the determine-reboot-cause does not finish before process-reboot-cause.

How I did it

This PR makes determine-reboot-cause.service into a oneshot service to ensure process-reboot-cause only runs once determine-reboot-cause completes.
This fix depends on a PR for process-reboot-cause.service dependency, which needs to be committed to 202205 branch.
#11213

How to verify it

Run "show reboot-cause" and "show reboot-cause history"
The latest entry in reboot-cause history should match the output of show reboot-cause.

Can check the journal logs of determine-reboot-cause.service and process-reboot-cause.service after a reboot to confirm that process-reboot-cause only runs after determine-reboot cause.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Update determine-reboot-cause.service to be oneshot service to ensure it completes before process-reboot-cause.service runs

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

@cytsao1 cytsao1 requested a review from lguohan as a code owner November 7, 2022 23:30
@cytsao1
Copy link
Contributor Author

cytsao1 commented Nov 9, 2022

@gechiang Could you check this?

@gechiang
Copy link
Collaborator

gechiang commented Nov 9, 2022

@prgeor , @sujinmkang , @lguohan ,
Can you help take a look at this change?
Thie change is built on top of fix PR #11213

Thanks

@rlhui rlhui added the P0 Priority of the issue label Nov 12, 2022
@prgeor prgeor merged commit 109020c into sonic-net:master Nov 12, 2022
@rlhui rlhui assigned prgeor and unassigned sujinmkang Nov 13, 2022
@bmridul
Copy link
Contributor

bmridul commented Nov 18, 2022

@abdosi , @gechiang Pls include this in 202205 branch.

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

Successfully merging this pull request may close these issues.

7 participants