Skip to content

Commit d6433d1

Browse files
authored
[reboot-cause] Fixed determine-reboot-cause.service failure. (#8210)
Signed-off-by: Rajkumar Pennadam Ramamoorthy rpennadamram@marvell.com Why I did it Install sonic image from ONIE. Once system is up, execute "config reload" command. Root cause is that "determine-reboot-cause.service" was in failed state. root@sonic:/host/reboot-cause# systemctl list-units --failed UNIT LOAD ACTIVE SUB DESCRIPTION ● determine-reboot-cause.service loaded failed failed Reboot cause determination service How I did it Fixed the issue by setting default reason to "REBOOT_CAUSE_UNKNOWN" instead of "None". How to verify it Check " determine-reboot-cause.service' loaded successfully post image installation from ONIE. Verify "reboot-cause.txt" file is created and config reload succeeds.
1 parent 14da7a1 commit d6433d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sonic-host-services/scripts/determine-reboot-cause

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def parse_warmfast_reboot_from_proc_cmdline():
6262

6363

6464
def find_software_reboot_cause_from_reboot_cause_file():
65-
software_reboot_cause = None
65+
software_reboot_cause = REBOOT_CAUSE_UNKNOWN
6666
if os.path.isfile(REBOOT_CAUSE_FILE):
6767
with open(REBOOT_CAUSE_FILE) as cause_file:
6868
software_reboot_cause = cause_file.readline().rstrip('\n')

0 commit comments

Comments
 (0)