leapp-repository/0013-Improve-the-checkgrubcore-report-message.patch
Petr Stodulka c64266d19b Pre CTC2 candidate
- Introduce new upgrade path RHEL 8.9 -> 9.3
- Update leapp data files to reflect new changes between systems
- Detect and report use of deprecated Xorg drivers
- Minor improvements of generated reports
- Fix false positive report about invalid symlinks
- Inhibit the upgrade when unsupported x86-64 microarchitecture is detected
- Resolves: rhbz#2215997
2023-06-19 23:53:40 +02:00

72 lines
3.9 KiB
Diff

From 0404072439f9c528d569cd23e60b83fb3823b3b5 Mon Sep 17 00:00:00 2001
From: mreznik <mreznik@redhat.com>
Date: Sun, 9 Apr 2023 10:37:31 +0200
Subject: [PATCH 13/30] Improve the "checkgrubcore" report message
No action is needed in case Leapp is able to detect the GRUB2 device
---
.../common/actors/checkgrubcore/actor.py | 16 +++++++++-------
.../checkgrubcore/tests/test_checkgrubcore.py | 2 +-
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/repos/system_upgrade/common/actors/checkgrubcore/actor.py b/repos/system_upgrade/common/actors/checkgrubcore/actor.py
index 37eeeca8..6aa99797 100644
--- a/repos/system_upgrade/common/actors/checkgrubcore/actor.py
+++ b/repos/system_upgrade/common/actors/checkgrubcore/actor.py
@@ -6,8 +6,10 @@ from leapp.models import FirmwareFacts, GrubInfo
from leapp.reporting import create_report, Report
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
-GRUB_SUMMARY = ('On legacy (BIOS) systems, GRUB core (located in the gap between the MBR and the '
- 'first partition) does not get automatically updated when GRUB is upgraded.')
+GRUB_SUMMARY = ('On legacy (BIOS) systems, GRUB2 core (located in the gap between the MBR and the '
+ 'first partition) cannot be updated during the rpm transaction and Leapp has to initiate '
+ 'the update running "grub2-install" after the transaction. No action is needed before the '
+ 'upgrade. After the upgrade, it is recommended to check the GRUB configuration.')
class CheckGrubCore(Actor):
@@ -33,7 +35,7 @@ class CheckGrubCore(Actor):
if grub_info.orig_device_name:
create_report([
reporting.Title(
- 'GRUB core will be updated during upgrade'
+ 'GRUB2 core will be automatically updated during the upgrade'
),
reporting.Summary(GRUB_SUMMARY),
reporting.Severity(reporting.Severity.HIGH),
@@ -41,13 +43,13 @@ class CheckGrubCore(Actor):
])
else:
create_report([
- reporting.Title('Leapp could not identify where GRUB core is located'),
+ reporting.Title('Leapp could not identify where GRUB2 core is located'),
reporting.Summary(
- 'We assume GRUB core is located on the same device as /boot. Leapp needs to '
- 'update GRUB core as it is not done automatically on legacy (BIOS) systems. '
+ 'We assumed GRUB2 core is located on the same device as /boot, however Leapp could not '
+ 'detect GRUB2 on the device. GRUB2 core needs to be updated maually on legacy (BIOS) systems. '
),
reporting.Severity(reporting.Severity.HIGH),
reporting.Groups([reporting.Groups.BOOT]),
reporting.Remediation(
- hint='Please run "grub2-install <GRUB_DEVICE> command manually after upgrade'),
+ hint='Please run "grub2-install <GRUB_DEVICE> command manually after the upgrade'),
])
diff --git a/repos/system_upgrade/common/actors/checkgrubcore/tests/test_checkgrubcore.py b/repos/system_upgrade/common/actors/checkgrubcore/tests/test_checkgrubcore.py
index 0816963b..fe15b65b 100644
--- a/repos/system_upgrade/common/actors/checkgrubcore/tests/test_checkgrubcore.py
+++ b/repos/system_upgrade/common/actors/checkgrubcore/tests/test_checkgrubcore.py
@@ -5,7 +5,7 @@ from leapp.libraries.common.config import mock_configs
from leapp.models import FirmwareFacts, GrubInfo
from leapp.reporting import Report
-NO_GRUB = 'Leapp could not identify where GRUB core is located'
+NO_GRUB = 'Leapp could not identify where GRUB2 core is located'
def test_actor_update_grub(current_actor_context):
--
2.40.1