dracut-kdump.sh: Save kexec-dmesg.log after failure_action

Resolves: RHEL-40817

commit 08649f2487300a077ee5a45ef045dc277c21484d
Author: Philipp Rudo <prudo@redhat.com>
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 <prudo@redhat.com>

Signed-off-by: Philipp Rudo <prudo@redhat.com>
This commit is contained in:
Philipp Rudo 2024-07-09 15:34:53 +02:00
parent 93b0538210
commit 3fe4cdffbc
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From afc6ddb781079dfbdf7919803114458907fc4e6a Mon Sep 17 00:00:00 2001
From: Philipp Rudo <prudo@redhat.com>
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 <prudo@redhat.com>
---
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

View File

@ -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