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]Correct reboot cause when reboot via power cycle #15

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@ def initialize_reboot_cause(self):
'reset_comex_wd' : "Reset requested from ComEx",
'reset_from_asic' : "Reset requested from ASIC",
'reset_reload_bios' : "Reset caused by BIOS reload",
'reset_sw_reset' : "Software reset",
'reset_hotswap_or_halt' : "Reset caused by hotswap or halt",
'reset_from_comex' : "Reset from ComEx",
'reset_voltmon_upgrade_fail': "Reset due to voltage monitor devices upgrade failure"
}
self.reboot_by_software = 'reset_sw_reset'
self.reboot_cause_initialized = True


Expand All @@ -351,6 +351,11 @@ def get_reboot_cause(self):
if self._verify_reboot_cause(reset_file):
return self.REBOOT_CAUSE_HARDWARE_OTHER, reset_cause

if self._verify_reboot_cause(self.reboot_by_software):
logger.log_info("Hardware reboot cause: the system was rebooted due to software requesting")
else:
logger.log_info("Hardware reboot cause: no hardware reboot cause found")

return self.REBOOT_CAUSE_NON_HARDWARE, ''


Expand Down