Leapp fails with 'Grubby listed `args=` multiple times with different values' or 'Grubby output is malformed'.
Environment
- Red Hat Enterprise Linux
- Version 7
- Version 8
- Leapp
Issue
The reboot after the leapp upgrade fails with a traceback that substantially says:
Grubby listed `args=` multiple times with different values
Full traceback:
Jul 10 10:01:34 localhost upgrade[24251]: 2024-07-10 06:01:34.899 INFO PID: 3 leapp.workflow.Finalization: Executing actor kernelcmdlineconfig
:
leapp.workflow.Finalization.kernelcmdlineconfig: External command has finished: ['grubby', '--info', '/boot/vmlinuz-4.18.0-553.8.1.el8_10.x86_64']
Jul 10 10:01:35 localhost upgrade[26325]: 2024-07-10 06:01:35.667 WARNING PID: 2076 leapp.workflow.Finalization.kernelcmdlineconfig: Grubby output is malformed: `root=` is listed more than once.
Jul 10 10:01:35 localhost upgrade[26325]: 2024-07-10 06:01:35.675 WARNING PID: 2076 leapp.workflow.Finalization.kernelcmdlineconfig: Grubby output is malformed: `args=` is listed more than once.
Jul 10 10:01:35 localhost upgrade[26325]: 2024-07-10 06:01:35.682 ERROR PID: 2076 leapp.workflow.Finalization.kernelcmdlineconfig: Grubby listed `args=` multiple times with different values.
Jul 10 10:01:35 localhost upgrade[26325]: Process Process-297:
Jul 10 10:01:35 localhost upgrade[26325]: Traceback (most recent call last):
Jul 10 10:01:35 localhost upgrade[26325]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py", line 173, in entrypoint
Jul 10 10:01:35 localhost upgrade[26325]: modify_kernel_args_in_boot_cfg(configs)
Jul 10 10:01:35 localhost upgrade[26325]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py", line 166, in modify_kernel_args_in_boot_cfg
Jul 10 10:01:35 localhost upgrade[26325]: kernel_root, kernel_args = retrieve_args_for_default_kernel(kernel_info)
Jul 10 10:01:35 localhost upgrade[26325]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py", line 128, in retrieve_args_for_default_kernel
Jul 10 10:01:35 localhost upgrade[26325]: raise ReadOfKernelArgsError('Grubby listed `args=` multiple'
Jul 10 10:01:35 localhost upgrade[26325]: leapp.libraries.actor.kernelcmdlineconfig.ReadOfKernelArgsError: Grubby listed `args=` multiple times with different values.
Jul 10 10:01:35 localhost upgrade[26325]: During handling of the above exception, another exception occurred:
Jul 10 10:01:35 localhost upgrade[26325]: Traceback (most recent call last):
Jul 10 10:01:35 localhost upgrade[26325]: File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
Jul 10 10:01:35 localhost upgrade[26325]: self.run()
Jul 10 10:01:35 localhost upgrade[26325]: File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
Jul 10 10:01:35 localhost upgrade[26325]: self._target(*self._args, **self._kwargs)
Jul 10 10:01:35 localhost upgrade[26325]: File "/root/tmp_leapp_py3/leapp/repository/actor_definition.py", line 74, in _do_run
Jul 10 10:01:35 localhost upgrade[26325]: actor_instance.run(*args, **kwargs)
Jul 10 10:01:35 localhost upgrade[26325]: File "/root/tmp_leapp_py3/leapp/actors/__init__.py", line 289, in run
Jul 10 10:01:35 localhost upgrade[26325]: self.process(*args)
Jul 10 10:01:35 localhost upgrade[26325]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/actor.py", line 33, in process
Jul 10 10:01:35 localhost upgrade[26325]: kernelcmdlineconfig.entrypoint(configs)
Jul 10 10:01:35 localhost upgrade[26325]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py", line 185, in entrypoint
Jul 10 10:01:35 localhost upgrade[26325]: report_hint = reporting.Hints(
Jul 10 10:01:35 localhost upgrade[26325]: AttributeError: module 'leapp.reporting' has no attribute 'Hints'
Jul 10 10:01:35 localhost upgrade[24251]: 2024-07-10 06:01:35.715 ERROR PID: 3 leapp.workflow.Finalization: Actor kernelcmdlineconfig has crashed: Traceback (most recent call last):
Jul 10 10:01:35 localhost upgrade[24251]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py", line 173, in entrypoint
Jul 10 10:01:35 localhost upgrade[24251]: modify_kernel_args_in_boot_cfg(configs)
Jul 10 10:01:35 localhost upgrade[24251]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py", line 166, in modify_kernel_args_in_boot_cfg
Jul 10 10:01:35 localhost upgrade[24251]: kernel_root, kernel_args = retrieve_args_for_default_kernel(kernel_info)
Jul 10 10:01:35 localhost upgrade[24251]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py", line 128, in retrieve_args_for_default_kernel
Jul 10 10:01:35 localhost upgrade[24251]: raise ReadOfKernelArgsError('Grubby listed `args=` multiple'
Jul 10 10:01:35 localhost upgrade[24251]: leapp.libraries.actor.kernelcmdlineconfig.ReadOfKernelArgsError: Grubby listed `args=` multiple times with different values.
Jul 10 10:01:35 localhost upgrade[24251]: During handling of the above exception, another exception occurred:
Jul 10 10:01:35 localhost upgrade[24251]: Traceback (most recent call last):
Jul 10 10:01:35 localhost upgrade[24251]: File "/root/tmp_leapp_py3/leapp/repository/actor_definition.py", line 74, in _do_run
Jul 10 10:01:35 localhost upgrade[24251]: actor_instance.run(*args, **kwargs)
Jul 10 10:01:35 localhost upgrade[24251]: File "/root/tmp_leapp_py3/leapp/actors/__init__.py", line 289, in run
Jul 10 10:01:35 localhost upgrade[24251]: self.process(*args)
Jul 10 10:01:35 localhost upgrade[24251]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/actor.py", line 33, in process
Jul 10 10:01:35 localhost upgrade[24251]: kernelcmdlineconfig.entrypoint(configs)
Jul 10 10:01:35 localhost upgrade[24251]: File "/etc/leapp/repos.d/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py", line 185, in entrypoint
Jul 10 10:01:35 localhost upgrade[24251]: report_hint = reporting.Hints(
Jul 10 10:01:35 localhost upgrade[24251]: AttributeError: module 'leapp.reporting' has no attribute 'Hints'
Jul 10 10:01:35 localhost upgrade[24251]: ====================================================================================================
Jul 10 10:01:35 localhost upgrade[24251]: Actor kernelcmdlineconfig unexpectedly terminated with exit code: 1 - Please check the above details
Jul 10 10:01:35 localhost upgrade[24251]: ====================================================================================================
Resolution
Red Hat Enhanced Linux 7:
Note: this issue has been fixed in December 2024 by the following errata:
RHBA-2024:10757 - Bug Fix Advisory
This content is not included.This content is not included.https://access.redhat.com/downloads/content/rhel---7/x86_64/3030/leapp-upgrade-el7toel8/0.20.0-13.el7_9/noarch/fd431d51/package
The workaround to bypass this error was to edit /etc/sysconfig/kernel and set MAKEDEBUG=no. This is not necessary anymore.
Red Hat Enhanced Linux 8:
There are still no fix in RHEL8 package. This issue is being tracked for RHEL 8 in the Jira This content is not included.RHEL-50686
To proceed with leapp upgrade, remove the debug kernels using:
# mkdir /root/grub-entries-backup
# mv /boot/loader/entries/*debug.conf /root/grub-entries-backup
# grub2-install /dev/sdX <-- remember to change your booting device
Note: Change /dev/sdX to the server booting device. To find it, use fdisk -l command to dump the disks and partitions.
To check the current kernel options, use:
# grubby --info=ALL | grep title
Root Cause
With MAKEDEBUG=yes, the grubby --info output shows 2 entries per kernel path, which is not handled by the KernelCmdlineConfig actor.
This issue is resolved on RHEL 7>8 by the Jira This content is not included.RHEL-46911 and it has been fixed by the following errata RHBA-2024:10757
This issue was tracked for RHEL 8>9 in the Jira This content is not included.RHEL-50686 and it has been fixed with the following errata: RHBA-2025:7522
Diagnostic Steps
If the below value is 'yes', then you can apply the resolution step.
# grep ^MAKEDEBUG /etc/sysconfig/kernel
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.