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

[Mellanox][202012][backport] Skip the leftover hardware reboot cause in case of last boot is warm/fast reboot #13378

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

keboliu
Copy link
Collaborator

@keboliu keboliu commented Jan 16, 2023

Signed-off-by: Kebo Liu [email protected]

Why I did it

Backport #13246 to 202012 branch.

In case of warm/fast reboot, the hardware reboot cause will NOT be cleared because CPLD will not be touched in this flow. To not confuse the reboot cause determine logic, the leftover hardware reboot cause shall be skipped by the platform API, platform API will return the 'REBOOT_CAUSE_NON_HARDWARE' instead of the "hardware" reboot cause.

How I did it

Check the proc cmdline to see whether the last reboot is a warm or fast reboot, if yes skip checking the leftover hardware reboot cause.

How to verify it

a. Manual test:

  1. Perform a power loss
  2. Perform a warm/fast reboot
  3. check the reboot cause should be "warm-reboot" or "fast-reboot" instead of "power loss"

b. Run reboot cause related regression test.

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

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

Description for the changelog

Ensure to add label/tag for the feature raised.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@keboliu keboliu requested a review from prgeor January 17, 2023 03:19
@prgeor
Copy link
Contributor

prgeor commented Jan 17, 2023

@qiluo-msft please help merge

@qiluo-msft qiluo-msft enabled auto-merge (squash) January 17, 2023 21:20
@qiluo-msft qiluo-msft disabled auto-merge January 17, 2023 21:20
@qiluo-msft qiluo-msft merged commit a569bfc into sonic-net:202012 Jan 17, 2023
@keboliu keboliu deleted the 202012_reboot_cause branch June 14, 2023 10:01
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