From 3fe4cdffbcf3653135fa3c3ad37255943659ec63 Mon Sep 17 00:00:00 2001 From: Philipp Rudo Date: Tue, 9 Jul 2024 15:34:53 +0200 Subject: [PATCH] dracut-kdump.sh: Save kexec-dmesg.log after failure_action Resolves: RHEL-40817 commit 08649f2487300a077ee5a45ef045dc277c21484d Author: Philipp Rudo Date: Thu Jun 20 13:19:30 2024 +0200 dracut-kdump.sh: Save kexec-dmesg.log after failure_action The kexec-dmesg.log is only saved after the initial dump attempt but not for the failure_action. So in case the initial dump attempt failed and the failure_action is dump_to_rootfs the kexec-dmesg.log is missing. Fix that by calling save_log also after executing the failure_action. Fixes: 3d70f8b ("logger: save log after all kdump progress finished") Signed-off-by: Philipp Rudo Signed-off-by: Philipp Rudo --- ...Save-kexec-dmesg.log-after-failure_a.patch | 32 +++++++++++++++++++ kexec-tools.spec | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 0005-dracut-kdump.sh-Save-kexec-dmesg.log-after-failure_a.patch diff --git a/0005-dracut-kdump.sh-Save-kexec-dmesg.log-after-failure_a.patch b/0005-dracut-kdump.sh-Save-kexec-dmesg.log-after-failure_a.patch new file mode 100644 index 0000000..abf0a81 --- /dev/null +++ b/0005-dracut-kdump.sh-Save-kexec-dmesg.log-after-failure_a.patch @@ -0,0 +1,32 @@ +From afc6ddb781079dfbdf7919803114458907fc4e6a Mon Sep 17 00:00:00 2001 +From: Philipp Rudo +Date: Thu, 20 Jun 2024 13:19:30 +0200 +Subject: [PATCH 5/7] dracut-kdump.sh: Save kexec-dmesg.log after + failure_action + +The kexec-dmesg.log is only saved after the initial dump attempt but not +for the failure_action. So in case the initial dump attempt failed and +the failure_action is dump_to_rootfs the kexec-dmesg.log is missing. Fix +that by calling save_log also after executing the failure_action. + +Fixes: 3d70f8b ("logger: save log after all kdump progress finished") +Signed-off-by: Philipp Rudo +--- + dracut-kdump.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut-kdump.sh b/dracut-kdump.sh +index 7b3ad7a..2e078c7 100755 +--- a/dracut-kdump.sh ++++ b/dracut-kdump.sh +@@ -579,6 +579,7 @@ fence_kdump_notify() + if [ "$1" = "--error-handler" ]; then + get_kdump_confs + do_failure_action ++ save_log + do_final_action + + exit $? +-- +2.45.2 + diff --git a/kexec-tools.spec b/kexec-tools.spec index c773615..c878f7c 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -69,6 +69,7 @@ Patch613: 0001-kdumpctl-Drop-default-kexec-d-option.patch Patch614: 0002-kdump-lib-fix-sed-expression-in-prepare_cmdline-on-a.patch Patch615: 0003-kdumpctl-Simplify-fadump-handling-in-reset_crashkern.patch Patch616: 0004-kdumpctl.8-Add-description-to-reset-crashkernel-rebo.patch +Patch617: 0005-dracut-kdump.sh-Save-kexec-dmesg.log-after-failure_a.patch %description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -168,6 +169,7 @@ tar -z -x -v -f %{SOURCE19} %patch 614 -p1 -d kdump-utils-%{kdump_utils_ver} %patch 615 -p1 -d kdump-utils-%{kdump_utils_ver} %patch 616 -p1 -d kdump-utils-%{kdump_utils_ver} +%patch 617 -p1 -d kdump-utils-%{kdump_utils_ver} %ifarch ppc %define archdef ARCH=ppc