kexec-tools/0004-kdumpctl.8-Add-description-to-reset-crashkernel-rebo.patch
Philipp Rudo 93b0538210 kdumpctl: Simplify fadump handling in reset_crashkernel
Resolves: RHEL-31422
Resolves: RHEL-42413

commit 574f8f588b5257d410c01de076644d398e1fc9e6
Author: Philipp Rudo <prudo@redhat.com>
Date:   Thu Jun 1 17:04:13 2023 +0200

    kdumpctl: Simplify fadump handling in reset_crashkernel

    When handling fadump there are three cases we need to consider

    1) When running on non-ppc64le systems
       In this case _dump_mode=kdump and _new_fadump='' always. In other
       words we don't need to care updating the fadump parameter on the
       kernel command line. We could always remove it like the code did so
       far. But should we remove it when we never set it? In particular as
       that might overwrite a change explicitly made by the user (for
       whatever reason)

    2) When running on ppc64le and the user provided --fadump option
       In this case _new_fadump and _dump_mode are set accordingly to what
       the user provided. Thus we need to update both the crashkernel (in
       case fadump was turned on/off) and the fadump (in case the fadump
       mode changed) parameters.

    3) When running on ppc64le but the user did not provide --fadump option
       In this case both _new_fadump='' and _dump_mode=''. In this case we
       take over the previously set fadump parameter. Which means that we
       don't need to update the fadump parameter at all. We do need to check
       whether the _new_dump_mode is fadump or kdump though so we use the
       correct (new) default crashkernel value.

    In the three cases only the second one needs to update the fadump
    parameter. Reflect this discussion in code.

    This also fixes a bug that always prints

            kdump: Updated fadump= for kernel=$kernel. Please reboot the
            system for the change to take effect.

    when the crashkernel= parameter is unchanged as well as reboots the
    system, if --reboot is provided. Even for non-ppc architectures.

    Fixes: 140da74 ("rewrite reset_crashkernel to support fadump and to used by RPM scriptlet")
    Signed-off-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Philipp Rudo <prudo@redhat.com>
2024-07-09 15:31:23 +02:00

33 lines
1.1 KiB
Diff

From de393c1bcb7d32e97d9b46bb6a73180072f03aa3 Mon Sep 17 00:00:00 2001
From: Philipp Rudo <prudo@redhat.com>
Date: Mon, 1 Jul 2024 12:52:39 +0200
Subject: [PATCH 4/7] kdumpctl.8: Add description to reset-crashkernel --reboot
There is no description for parameter --reboot for reset-crashkernel.
Thus add one.
Suggested-by: Lichen Liu <lichliu@redhat.com>
Signed-off-by: Philipp Rudo <prudo@redhat.com>
---
kdumpctl.8 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kdumpctl.8 b/kdumpctl.8
index 33c1115..29a6119 100644
--- a/kdumpctl.8
+++ b/kdumpctl.8
@@ -62,6 +62,10 @@ grubby's kernel-path=ALL and kernel-path=DEFAULT. ppc64le supports FADump and
supports an additional [--fadump=[on|off|nocma]] parameter to toggle FADump
on/off.
+If the optional parameter [--reboot] is provided the system will automatically
+reboot for changes to take effect. If no changes were made to the kernel
+command line the reboot is omitted.
+
Note: The memory requirements for kdump varies heavily depending on the
used hardware and system configuration. Thus the recommended
crashkernel might not work for your specific setup. Please test if
--
2.45.2