Hi Coiby,
On Mon, Feb 14, 2022 at 11:10 AM Coiby Xu <coxu(a)redhat.com> wrote:
On Wed, Feb 09, 2022 at 11:25:21AM +0800, Tao Liu wrote:
>Reviewed-by: Tao Liu <ltao(a)redhat.com>
Thanks for reviewing the patch! I've merged the patch with slightly
changed commit message as this patch only fixes the case of normal
kexec-tools upgrade. I'll send other patches to fix the case of in-place
upgrade later.
OK, thanks for the update!
Thanks,
Tao Liu
>
>
>On Wed, Feb 9, 2022 at 8:19 AM Coiby Xu <coxu(a)redhat.com> wrote:
>>
>> It's found that the kernel crashkernel doesn't get updated when
in-place
>> upgrading from rhel8 to rhel9. This happens because
_get_all_kernels_from_grubby
>> is called with no argument by reset_crashkernel_after_update. When retrieving
all
>> kernel paths on the system, "grubby --info ALL" should be used. Fix
this
>> error by passing "ALL" argument.
>>
>> Fixes: 0adb0f4 ("try to reset kernel crashkernel when kexec-tools updates
the default crashkernel value")
>>
>> Reported-by: Jie Li <jieli(a)redhat.com>
>> Signed-off-by: Coiby Xu <coxu(a)redhat.com>
>> ---
>> kdumpctl | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/kdumpctl b/kdumpctl
>> index bf74c75..9fd76ac 100755
>> --- a/kdumpctl
>> +++ b/kdumpctl
>> @@ -1382,6 +1382,11 @@ _valid_grubby_kernel_path()
>> [[ -n "$1" ]] && grubby --info="$1" >
/dev/null 2>&1
>> }
>>
>> +# return all the kernel paths given a grubby kernel-path
>> +#
>> +# $1: kernel path accepted by grubby, e.g. DEFAULT, ALL,
>> +# /boot/vmlinuz-`uname -r`
>> +# return: kernel paths separated by space
>> _get_all_kernels_from_grubby()
>> {
>> local _kernels _line _kernel_path _grubby_kernel_path=$1
>> @@ -1557,7 +1562,7 @@ reset_crashkernel_after_update()
>> _crashkernel_vals[new_kdump]=$(get_default_crashkernel kdump)
>> _crashkernel_vals[new_fadump]=$(get_default_crashkernel fadump)
>>
>> - for _kernel in $(_get_all_kernels_from_grubby); do
>> + for _kernel in $(_get_all_kernels_from_grubby ALL); do
>> _crashkernel=$(get_grub_kernel_boot_parameter
"$_kernel" crashkernel)
>> if [[ $_crashkernel == auto ]]; then
>> reset_crashkernel "--kernel=$_kernel"
>> --
>> 2.34.1
>> _______________________________________________
>> kexec mailing list -- kexec(a)lists.fedoraproject.org
>> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
>> Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>> List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
>> List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
>> Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure
>
--
Best regards,
Coiby