Unnamed repository
Go to file
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
spec Get rid of "grep: warning: stray \ before /" 2024-01-31 14:38:49 +08:00
tests tests: use the default crashkernel value 2023-06-20 10:24:25 +08:00
.editorconfig dracut-early-kdump: explicitly use bash 2023-01-30 17:37:23 +08:00
.gitignore unit tests: prepare for kdumpctl and kdump-lib.sh to be unit-tested 2022-04-14 11:44:12 +08:00
.packit.yaml [packit] 2.0.27 upstream release 2023-08-31 11:29:43 +08:00
.shellspec unit tests: add tests for get_grub_kernel_boot_parameter 2022-04-14 11:44:27 +08:00
0001-dracut-module-setup-Fix-missing-systemd-system.conf-.patch Re apply upstream patches 2024-06-11 11:05:24 +08:00
0001-kdumpctl-Drop-default-kexec-d-option.patch kdumpctl: Drop default kexec '-d' option 2024-07-09 15:17:35 +02:00
0001-Use-grep-q-cmd-instead-of-cmd-grep-q.patch Use "grep -q <<< $(cmd)" instead of "cmd | grep -q" 2024-06-28 15:15:14 +12:00
0002-kdump-lib-fix-sed-expression-in-prepare_cmdline-on-a.patch kdump-lib: fix sed expression in prepare_cmdline on aarch64 2024-07-09 15:20:24 +02:00
0002-mkdumprd-Fix-makedumpfile-parameter-check.patch Re apply upstream patches 2024-06-11 11:05:24 +08:00
0003-kdumpctl-Simplify-fadump-handling-in-reset_crashkern.patch kdumpctl: Simplify fadump handling in reset_crashkernel 2024-07-09 15:31:23 +02:00
0003-Try-to-install-PHY-and-MDIO-bus-drivers-explicitly.patch Re apply upstream patches 2024-06-11 11:05:24 +08:00
0004-Install-the-driver-of-physical-device-for-a-SR-IOV-v.patch Re apply upstream patches 2024-06-11 11:05:24 +08:00
0004-kdumpctl.8-Add-description-to-reset-crashkernel-rebo.patch kdumpctl: Simplify fadump handling in reset_crashkernel 2024-07-09 15:31:23 +02:00
0005-update-98-kexec-rules-for-crash-hotplug.patch Re apply upstream patches 2024-06-11 11:05:24 +08:00
0006-sysconfig-add-pcie_ports-compat-to-KDUMP_COMMANDLINE.patch Re apply upstream patches 2024-06-11 11:05:24 +08:00
0007-fadump-udev-do-not-re-register-fadump-if-kernel-hotp.patch Re apply upstream patches 2024-06-11 11:05:24 +08:00
gating.yaml Add gating.yaml to RHEL-10 kexec-tools 2024-04-22 17:12:25 +08:00
kexec-tools-2.0.28-Fix-building-on-x86_64-with-binutils-2.41.patch 2.0.28 upstream release 2024-02-02 20:13:00 +08:00
kexec-tools-2.0.28-kexec-don-t-use-kexec_file_load-on-XEN.patch 2.0.28 upstream release 2024-02-02 20:13:00 +08:00
kexec-tools-2.0.28-makedumfpile-0001-PATCH-ppc64-get-vmalloc-start-address-from-vmcoreinf.patch Release 2.0.26-7 2024-04-29 10:04:27 +08:00
kexec-tools-2.0.28-makedumpfile-0002-PATCH-Fix-failure-of-hugetlb-pages-exclusion-on-Linu.patch Release 2.0.28-12 2024-06-19 09:11:53 +08:00
kexec-tools-2.0.28-makedumpfile-0003-PATCH-Fix-wrong-exclusion-of-Slab-pages-on-Linux-6.1.patch Release 2.0.28-12 2024-06-19 09:11:53 +08:00
kexec-tools.spec kdumpctl: Simplify fadump handling in reset_crashkernel 2024-07-09 15:31:23 +02:00
README README: Add a README file 2014-04-02 10:45:36 +08:00
README.packit 2.0.28 upstream release 2024-02-02 20:13:00 +08:00
sources makedumpfile: remove explicit-lib-dependency zlib 2024-04-29 10:35:57 +08:00

Adding a patch to kexec-tools
=============================
There is a mailing list kexec@lists.fedoraproject.org where all the dicussion
related to fedora kexec-tools happen. All the patches are posted there for
inclusion and committed to kexec-tools after review.

So if you want your patches to be included in fedora kexec-tools package,
post these to kexec@lists.fedoraproject.org.

One can subscribe to list and browse through archives here.

https://admin.fedoraproject.org/mailman/listinfo/kexec