Keep track of panic sysctls in the kdump-steamos package

Before this patch, the sysctl parameters for panic on oops, lockups, etc
were tracked in the "image-recipes/jupiter" gitlab repositories. After
MR [0] this changed and now we must keep track of the sysctls inside
the kdump-steamos package.

Hence, this commit adds the sysctl config file into "/usr/lib/sysctl.d",
also introducing the "panic_print" sysctl, to enable dumping more info
on panic events.

[0] https://gitlab.steamos.cloud/jupiter/jupiter/-/merge_requests/1

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
Guilherme G. Piccoli
2022-01-26 12:35:37 -03:00
parent e9407c3132
commit 10719e664e
2 changed files with 36 additions and 2 deletions

31
20-kdump-steamos.conf Normal file
View File

@ -0,0 +1,31 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright (c) 2022 Valve.
# Maintainer: Guilherme G. Piccoli <gpiccoli@igalia.com>
#
# This file sets the sysctl parameters that are used by the
# kdump-steamos package, in order to panic and reboot on
# severe events, like oops or soft/hard lockups.
# Also, we set panic_print in order to collect more info.
kernel.panic_on_oops = 1
kernel.panic_on_rcu_stall = 1
kernel.softlockup_panic = 1
kernel.hardlockup_panic = 1
# reboot as soon as possible after a panic event.
kernel.panic = -1
# dump more information when facing a panic event:
# bit 0 - print all tasks info
# bit 1 - print system memory info
# bit 2 - print timer info
# bit 6 - print all CPUs backtrace (currently on linux-next)
kernel.panic_print = 71
# Currently disabled, since SteamOS might get stuck while
# doing installation on drive using calamares.
kernel.hung_task_panic = 0

View File

@ -12,7 +12,8 @@ arch=('x86_64')
license=('GPL2') license=('GPL2')
install=kdump-steamos.install install=kdump-steamos.install
source=('kdump_collect.sh' source=('20-kdump-steamos.conf'
'kdump_collect.sh'
'kdump.etc' 'kdump.etc'
'kdump_load.sh' 'kdump_load.sh'
'kdump-steamos.install' 'kdump-steamos.install'
@ -22,7 +23,8 @@ source=('kdump_collect.sh'
'submit_report.sh' 'submit_report.sh'
'submitter_load.sh') 'submitter_load.sh')
sha256sums=('2514f79a496f76af847e262eadd55a5c2f8d95375cc513efa8cadd4cd98fe1d2' sha256sums=('dbedff54addfb5dce51614c73df04c90fca9f27d0d3a690243259ccbbfcca07c'
'2514f79a496f76af847e262eadd55a5c2f8d95375cc513efa8cadd4cd98fe1d2'
'd0ac5e7e38fa1d3355eacdf70188483456f53d3e2b18cd161dea3df87b0b8f9c' 'd0ac5e7e38fa1d3355eacdf70188483456f53d3e2b18cd161dea3df87b0b8f9c'
'8a556a9ebbda88dfd29b9620a0f2e7dbea19cd5fc019eb5dc4ebf7c80e4bf238' '8a556a9ebbda88dfd29b9620a0f2e7dbea19cd5fc019eb5dc4ebf7c80e4bf238'
'06b38bd9f09da5fb22a765b6f1945fc349cc5f9d13cd32c9218b9b60b40a9010' '06b38bd9f09da5fb22a765b6f1945fc349cc5f9d13cd32c9218b9b60b40a9010'
@ -36,6 +38,7 @@ package() {
install -D -m0644 kdump.etc "$pkgdir/etc/default/kdump" install -D -m0644 kdump.etc "$pkgdir/etc/default/kdump"
install -D -m0644 kdump-steamos.service "$pkgdir/usr/lib/systemd/system/kdump-steamos.service" install -D -m0644 kdump-steamos.service "$pkgdir/usr/lib/systemd/system/kdump-steamos.service"
install -D -m0644 20-kdump-steamos.conf "$pkgdir/usr/lib/sysctl.d/20-kdump-steamos.conf"
install -D -m0755 kdump_collect.sh "$pkgdir/usr/lib/dracut/modules.d/55kdump/kdump_collect.sh" install -D -m0755 kdump_collect.sh "$pkgdir/usr/lib/dracut/modules.d/55kdump/kdump_collect.sh"
install -D -m0755 module-setup.sh "$pkgdir/usr/lib/dracut/modules.d/55kdump/module-setup.sh" install -D -m0755 module-setup.sh "$pkgdir/usr/lib/dracut/modules.d/55kdump/module-setup.sh"