From f18e2488a3ca6f4080a0ae97644273fc6e45d307 Mon Sep 17 00:00:00 2001 From: Yuriy Kohut Date: Thu, 29 Aug 2024 12:36:23 +0300 Subject: [PATCH 1/2] ReadOfKernelArgsError: fix the error: - AttributeError: module 'leapp.reporting' has no attribute 'Hints' --- .../kernelcmdlineconfig/libraries/kernelcmdlineconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py b/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py index 238a8aa6f0..6b261c3bb4 100644 --- a/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py +++ b/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py @@ -175,14 +175,14 @@ def entrypoint(configs=None): api.current_logger().error(str(e)) if use_cmdline_file(): - report_hint = reporting.Hints( + report_hint = ( 'After the system has been rebooted into the new version of RHEL, you' ' should take the kernel cmdline arguments from /proc/cmdline (Everything' ' except the BOOT_IMAGE entry and initrd entries) and copy them into' ' /etc/kernel/cmdline before installing any new kernels.' ) else: - report_hint = reporting.Hints( + report_hint = ( 'After the system has been rebooted into the new version of RHEL, you' ' should take the kernel cmdline arguments from /proc/cmdline (Everything' ' except the BOOT_IMAGE entry and initrd entries) and then use the' @@ -204,7 +204,7 @@ def entrypoint(configs=None): ' not able to set the arguments as the default for kernels installed in' ' the future.' ), - report_hint, + reporting.Remediation(hint=report_hint), reporting.Severity(reporting.Severity.HIGH), reporting.Groups([ reporting.Groups.BOOT, From 46df911f3d0df88de60e6438d2956fc0fca11468 Mon Sep 17 00:00:00 2001 From: Yuriy Kohut Date: Thu, 29 Aug 2024 12:40:26 +0300 Subject: [PATCH 2/2] Run 'efi_finalization_fix' before 'kernelcmdlineconfig' to handle specific distro grub config rebuilding before extra arguments are appended to the kernel comand line Fix the error: - leapp.libraries.actor.kernelcmdlineconfig.ReadOfKernelArgsError: Failed to retrieve kernel command line to save for future installed kernels: root=None, args=$kernelopts $tuned_params --- .../common/actors/efibootorderfix/finalization/actor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py b/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py index 4a2bc8ad63..4ddde9f744 100644 --- a/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py +++ b/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py @@ -18,7 +18,7 @@ class EfiFinalizationFix(Actor): name = 'efi_finalization_fix' consumes = (KernelCmdlineArg, InstalledTargetKernelVersion, FirmwareFacts, MountEntry) produces = () - tags = (FinalizationPhaseTag, IPUWorkflowTag) + tags = (FinalizationPhaseTag.Before, IPUWorkflowTag) def process(self): is_system_efi = False