Commit Graph

10 Commits

Author SHA1 Message Date
Joe LeVeque
ceb878414d [process-reboot-cause] If software reboot cause is unknown add note if first boot into new image (#4538) 2020-05-08 20:37:22 +00:00
Stephen Sun
726fecaf8b [process-reboot-cause]Clean up the process-reboot-cause as reqired in issue 3927 (#4128) 2020-02-14 19:37:30 +00:00
Sujin Kang
956b8fd7c7 [reboot cause]: Delay process-reboot-cause service until network connection is stable (#4003) 2020-01-11 01:09:08 +00:00
Stephen Sun
49869aa6fa [process-reboot-cause]Address the issue: Incorrect reboot cause returned when warm reboot follows a hardware caused reboot (#3880)
* [process-reboot-cause]Address the issue: Incorrect reboot cause returned when warm reboot follows a hardware caused reboot
1. check whether /proc/cmdline indicates warm/fast reboot.
   if yes the software reboot cause file will be treated as the reboot cause.
   finish
2. check whether platform api returns a reboot cause.
   if yes it is treated as the reboot cause.
   finish.
3. check whether /hosts/reboot-cause contains a cause.
   if yes it is treated as the cause otherwise return unknown.

* [process-reboot-cause]Fix review comments

* [process-reboot-cause]address comments
1. use "with" statement
2. update fast/warm reboot BOOT_ARG

* [process-reboot-cause]address comments

* refactor the code flow

* Remove escape

* Remove extra ':'
2019-12-14 17:44:02 +00:00
sridhar-ravindran
d4758afdde [DELL] S6100 Add PowerCycle Support for Last Reset Reason (#3402)
* [DELL] S6100 Add PowerCycle Support for Last Reset Reason

* handle first time boot properly

* S6000 Last Reboot Reason Fix
2019-09-09 22:33:32 -07:00
Joe LeVeque
da57e8db36 Revert back to 'import sonic_platform' (#3249) 2019-07-31 16:44:17 -07:00
Stephen Sun
7a9d04ee73 [Mellanox] Backporting reboot cause to 201811 (#3198)
* backport new platform api to 201811, reboot cause part

* install new platform api on host

* 1. remove chassis's dependency on sonic_platform_daemon.
2. add some mellanox-specific hardware reboot causes.
3. fix typo in files/image_config/process-reboot-cause/process-reboot-cause.

* 1. add dependency of sonic_platform for base image
2. handle the case of reboot cause file not found

* adjust log message.
2019-07-23 07:05:35 -07:00
zzhiyuan
0869fd3925 [baseimage]: Fix process-reboot-cause possibly throwing OSError (#3159)
In case of going from previous iteration of SONiC, and the last reboot
was hardware, REBOOT_CAUSE_FILE may not be present and the service may
throw an error.
2019-07-16 21:38:46 +00:00
Joe LeVeque
c3932e501b [process-reboot-cause] Handle case if platform does not yet have sonic_platform implementation (#3126) 2019-07-10 23:06:43 +00:00
Joe LeVeque
1115c8431d [reboot-cause]: Move reboot cause processing to its own service, 'process-reboot-cause' (#3102) 2019-07-10 23:02:57 +00:00