This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/src
yozhao101 6fc589744f
[determine-reboot-cause] Support 'Kernel Panic' reboot cause (#7153)
Signed-off-by: Yong Zhao yozhao@microsoft.com

Why I did it
If device reboot was caused by kernel panic, then we need retrieve and store the key information into the symbol file previous-reboot-cause.json. The CLI show reboot-cause will read this file to get the reason of previous reboot.

This PR is related to PR in sonic-utilities repo: Azure/sonic-utilities#1486

How I did it
The string variable previous_reboot_cause will be parsed to check whether it contains the keyword Kernel Panic. If it did, then store the keyword and time information into a dictionary.

How to verify it
I verified this change on a virtual testbed.

admin@vlab-01:/host/reboot-cause$ more previous-reboot-cause.json
{"gen_time": "2021_03_24_23_22_35", "cause": "Kernel Panic", "user": "N/A", "time": "Wed 24 Mar 2021 11:22:03 PM UTC", "comment": "N/A"}

admin@vlab-01:/host/reboot-cause$ show reboot-cause
Kernel Panic [Time: Wed 24 Mar 2021 11:22:03 PM UTC]
2021-03-31 12:14:16 -07:00
..
bash [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
dhcpmon [dhcpmon] Print Both Snapshot And Current Counters (#5374) 2020-09-15 15:27:36 -07:00
ethtool Backport ethtool to support QSFP-DD (#5725) 2021-03-16 09:56:53 -07:00
gobgp Update go version to 1.11.2 for gobgp and telemetry (#2230) 2018-11-09 21:56:39 -08:00
hiredis [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
iccpd [iccpd] Fix the bug of iccp cmd show. (#5214) 2020-09-01 13:07:13 -07:00
ifupdown2 [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
initramfs-tools [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
iproute2 [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
iptables [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
isc-dhcp DHCP Relay: add option -si to support using src intf ip in relay (#7052) 2021-03-19 13:27:14 -07:00
ixgbe Reorganize .gitignore files (#4707) 2020-06-09 21:04:55 -07:00
kdump-tools [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
libnl3 [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
libteam [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
libyang Export libyang API "lyd_check_mandatory_tree" for Management framework (CVL) (#5714) 2021-01-14 16:47:57 -08:00
libyang1 [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
lldpd [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
lm-sensors [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
monit [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
mpdecimal [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
ntp [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
openssh [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
ptf@36a3e3d9ac [docker-sonic-mgmt] install ptf framework in mgmt container and upgrade ptf (#3239) 2019-07-30 10:19:48 -07:00
redis [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
redis-dump-load@7585497951 [redis-dump-load] Update submodule (#5215) 2020-08-19 11:23:42 -07:00
redis-dump-load.patch [baseimage]: Build and install redis-dump-load Python 3 package in host image (#4661) 2020-05-30 05:52:27 -07:00
sflow [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
smartmontools [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
snmpd [arm64] disable snmp's parallel make (#6592) 2021-01-31 17:30:30 -08:00
socat [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
sonic-bgpcfgd [bgp]: Reduce bgp connect retry timer to 10 seconds (#7169) 2021-03-27 11:36:56 -07:00
sonic-build-hooks Version control git (#6562) 2021-02-04 17:01:06 +08:00
sonic-config-engine [dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 (#7083) 2021-03-27 21:14:24 -07:00
sonic-ctrmgrd Copy dummy flannel.conf to get around absence of CNI Network (#6985) 2021-03-09 19:49:54 -08:00
sonic-dbsyncd@5cc29a1b32 [lldp]: Lldp docker to use python3 version of sonic-db-syncd package. (#6046) 2020-11-30 10:44:40 -08:00
sonic-device-data [DPB|master] Update Dynamic Port Breakout Logic for flexible alias support a… (#6831) 2021-02-26 00:13:33 -08:00
sonic-frr [frr]: upgrade frr to frr-7.5.1 (#7003) 2021-03-10 12:50:54 -08:00
sonic-frr-mgmt-framework Bump pyyaml from 5.3.1 to 5.4.1 (#6511) 2021-01-28 10:46:56 -08:00
sonic-host-services [determine-reboot-cause] Support 'Kernel Panic' reboot cause (#7153) 2021-03-31 12:14:16 -07:00
sonic-host-services-data [services] introduce sonic.target (#5705) 2021-02-25 14:26:24 +02:00
sonic-linux-kernel@65fccd7a07 [submodule]: update sonic-linux-kernel (#6908) 2021-02-28 23:58:59 -08:00
sonic-mgmt-common@86c1108125 [sonic-mgmt-common] Update submodule (#6129) 2020-12-08 04:31:16 -08:00
sonic-mgmt-framework@3c3384cec8 Mgmt reorg -- submodule and build rules for sonic-mgmt-common (#4765) 2020-06-22 16:01:55 -07:00
sonic-platform-common@1673d25948 [sonic-platform-common] submodule update (#6983) 2021-03-08 10:16:25 -08:00
sonic-platform-daemons@260cf2dedb [sonic-platform-daemons] submodule update (#7143) 2021-03-30 12:26:18 -07:00
sonic-py-common Fix Python 3 'importlib' bug; Add support for Python 2 back in sonic-py-common (#6933) 2021-03-02 18:31:19 -08:00
sonic-py-swsssdk@6e42d58c15 [sonic-py-swsssdk] update submodule: fix fdbshow, show arp commands (#6074) 2020-12-02 18:17:24 -08:00
sonic-quagga@e3b3b634e7 [sonic-quagga] update submodule with multiDB Changes (#4557) 2020-05-27 11:12:33 -07:00
sonic-restapi@71847d3fbe Submodule update for restapi (#6808) 2021-02-19 13:33:31 -08:00
sonic-sairedis@bc58b0fb7e [sonic-sairedis][sonic-swss] Update submodules (#7089) 2021-03-26 10:01:08 -07:00
sonic-snmpagent@c20bf60436 [Submodule update] sonic-snmpagent (#7107) 2021-03-24 18:46:18 -07:00
sonic-swss@fa983d2e2b [sonic-swss] Update submodule (#7197) 2021-03-31 10:45:36 -07:00
sonic-swss-common@c2ccaa36c9 [submodule]: update swss-common (#7121) 2021-03-29 15:23:50 -07:00
sonic-telemetry@7cd86c5a6b [submodule]: update telemetry submodule (#6810) 2021-02-24 17:22:54 -08:00
sonic-utilities@9a2872dbb2 [sonic-utilities] submodule update (#7201) 2021-03-31 12:00:35 -07:00
sonic-yang-mgmt [yang-models]: Remove PLY Extensions and change translation code. (#6915) 2021-03-28 00:49:10 -07:00
sonic-yang-models [yang]: Split yang tests into multiple files (#6939) 2021-03-31 10:58:13 -07:00
sonic-ztp@911d62238c [sonic-utilities] Build and install as a Python wheel package (#5409) 2020-09-20 20:16:42 -07:00
swig [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
system-health Check fan speed before check fan status (#6586) 2021-01-31 09:06:36 +02:00
systemd-sonic-generator [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
tacacs [tacacs]: do not modify local user if there is no priviledge 2021-02-06 12:28:52 -08:00
thrift [build]: fix dpkg admindir corruption issue in parallel build (#6408) 2021-01-12 06:03:12 -08:00
wpasupplicant [MACsec]: Set MACsec feature to be auto-start (#6678) 2021-02-23 13:22:45 -08:00