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