From 53389f3dc6609c2c3ffdd85140488326108628e0 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 23 Dec 2020 14:55:41 +0100 Subject: [PATCH] TT#105871 Update kernel.core_pattern check for Debian/bullseye support As of systemd v243 the kernel.core_pattern for systemd-coredump (once again[1]) no longer includes the hostname, see systemd.git commit: | commit 47cf786c0a13fccd777c334bed4b1e7b02f18d42 | Author: Franck Bui | Date: Fri Jun 21 13:12:41 2019 +0200 | | coredump: rely on /proc exclusively to get the name of the crashing process [1] This is similar to a revert of our commit a78509496d42ef, which mentioned: | commit f45b8015513d38ee5f7cc361db9c5b88c9aae704 | Author: Jakub Filak | Date: Thu Feb 15 12:12:46 2018 +0100 | | coredump: accept hostname on command line (#8033) We can't just revert the change though, as we need to distinguish between Debian 11/bullseye and older releases, while commit a78509496d42ef was for Debian 10/buster and older releases. Change-Id: I844bc6f23b1acd2ce583bc59f67ea70956863653 --- templates/610_kernel-sysctl-params.yaml.tt2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/610_kernel-sysctl-params.yaml.tt2 b/templates/610_kernel-sysctl-params.yaml.tt2 index cbd1da5..7f899c0 100644 --- a/templates/610_kernel-sysctl-params.yaml.tt2 +++ b/templates/610_kernel-sysctl-params.yaml.tt2 @@ -4,7 +4,11 @@ kernel-param: value: "1" kernel.core_pattern: +{{if eq .Env.DEBIAN_RELEASE "11"}} + value: "|/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h" +{{else}} value: "|/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h %e" +{{end}} fs.suid_dumpable: value: "2"