From ae272e2df8f1cc9008e347bdac47537f6a28249f Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Feb 23 2023 01:21:47 +0000 Subject: Reset crashkernel to default value if newly installed kernel has crashkernel=auto Resolves: bz2168504 Upstream: RHEL-only After leapp upgrade from 8.8 to 9.2 on Azure, RHEL9 kernel has crashkernel=auto. This happens because kexec-tools's posttrans scriptlet is executed before kernel's posttrans scriptlet (which in turn runs the kernel-install hooks). One of the kernel-install hook is responsible for adding a new boot entry for the new kernel. So when kexec-tools's posttrans scriptlet is running, RHEL9 kernel is yet to have a boot entry so kexec-tools couldn't set up the crashkernel parameter. Later one kernel-install hook makes RHEL9 kernel inherit crashkernel=auto. Fix this issue by letting 92-crashkernel.install reset crashkernel=auto. Reported-by: Yuxin Sun Signed-off-by: Coiby Xu --- diff --git a/kdumpctl b/kdumpctl index 1005e6d..7ebeb43 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1770,6 +1770,8 @@ reset_crashkernel_for_installed_kernel() if _update_kernel_cmdline "$_installed_kernel" "$_crashkernel_running" "$_dump_mode_running" "$_fadump_val_running"; then echo "kexec-tools has reset $_installed_kernel to use the new default crashkernel value $_crashkernel_running" fi + elif [[ $_crashkernel == auto ]]; then + reset_crashkernel "--kernel=$_installed_kernel" fi }