[kdump]: Kdump usability and reliability improvements (#6113)

- Allow platform specific reboot script to be called after crash kernel has
finished copying the kernel vmcore
- Disable pcie advanced features when running crash kernel. This improves
reliability of the crash kernel to successfully create a vmcore and also
reboot
- Allow crash kernel to reboot if a panic is seen while it is generating a
vmcore
- Fix crash kernel to use the SONiC specific /usr/local/bin/reboot script
instead of the Linux reboot command /sbin/reboot
- Use sonic_platform as the kernel command line parameter to pass platform identifier string

Signed-off-by: Rajendra Dendukuri <rajendra.dendukuri@broadcom.com>
This commit is contained in:
rajendra-dendukuri 2020-12-10 04:32:37 -05:00 committed by GitHub
parent 8d00b57959
commit 31ce20ac38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View File

@ -285,6 +285,7 @@ sudo sed -i -e '/^passwd/s/ tacplus//' $FILESYSTEM_ROOT/etc/nsswitch.conf
if [[ $CONFIGURED_ARCH == amd64 ]]; then
sudo DEBIAN_FRONTEND=noninteractive dpkg --root=$FILESYSTEM_ROOT -i $debs_path/kdump-tools_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true chroot $FILESYSTEM_ROOT apt-get -q --no-install-suggests --no-install-recommends --force-no install
cat $IMAGE_CONFIGS/kdump/kdump-tools | sudo tee -a $FILESYSTEM_ROOT/etc/default/kdump-tools > /dev/null
fi
# Install python-swss-common package and all its dependent packages

View File

@ -0,0 +1,13 @@
# ---------------------------------------------------------------------------
# Additional Kdump environment settings used in SONiC
#
# Reboot crash kernel on panic
# Enable debug level logging of crash kernel for better visibility
# Disable advanced pcie features
# Disable high precision event timer as on some platforms it is interfering with the kdump operation
# Pass platform identifier string as part of crash kernel command line to be used by the reboot script during kdump
KDUMP_CMDLINE_APPEND+=" panic=10 debug hpet=disable pcie_port=compat pci=nommconf sonic_platform=__PLATFORM__"
# Use SONiC reboot wrapper script present in /usr/local/bin post kdump
PATH=/usr/local/bin:$PATH

View File

@ -365,6 +365,9 @@ if [ -f $FIRST_BOOT_FILE ]; then
# Firsttime ebtables configuration
ebtables_config
# Kdump tools configuration
sed -i -e "s/__PLATFORM__/$platform/g" /etc/default/kdump-tools
firsttime_exit
fi