oamg / leapp-repository

Leapp repositories containing actors for the Leapp framework (https://github.com/oamg/leapp). Currently provides leapp repositories for in-place upgrades of RHEL systems.
Apache License 2.0
48 stars 144 forks source link

check_grub_legacy: inhibit when GRUB legacy is present #1206

Closed MichalHe closed 4 months ago

MichalHe commented 4 months ago

Adds a new actor checking for whether any of the GRUB devices have the old GRUB Legacy installed. If any of such devices is detected, the upgrade is inhibited. The GRUB Legacy is detected by searching for the string 'GRUB version 0.94' in file -s of the device.

jira: RHEL-13342

github-actions[bot] commented 4 months ago

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable. If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build. If you need a different version of leapp, e.g. from PR#42, use /packit test oamg/leapp#42 Note that first time contributors cannot run tests automatically - they will be started by a reviewer.

It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported, beaker-minimal and kernel-rt, both can be used to be run on all upgrade paths or just a couple of specific ones. To launch on-demand tests with packit:

See other labels for particular jobs defined in the .packit.yaml file.

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please contact leapp-infra.

MichalHe commented 4 months ago

I have manually tested the patch, thus, the PR is ready for review.

pirat89 commented 4 months ago

The code works otherwise as expected. Tested on my upgraded 6 -> 7 system.


============================================================
                      REPORT OVERVIEW                       
============================================================

Upgrade has been inhibited due to the following problems:
    1. GRUB Legacy is used on the system
    ...

####
Risk Factor: high (inhibitor)
Title: GRUB Legacy is used on the system
Summary: Leapp detected GRUB Legacy to be installed on the system. The GRUB Legacy bootloader is unsupported on RHEL7 and GRUB2 should be used instead. GRUB Legacy has been detected on following devices:
/dev/vda

Related links:
    - How to install GRUB2 after a RHEL6 to RHEL7 upgrade: https://access.redhat.com/solutions/2643721
Remediation: [hint] Migrate to the GRUB2 bootloader on the reported devices.
Key: cb875a7c4a8d115b11659324aaca785f9e45ff72
pirat89 commented 4 months ago

Updated results:

Risk Factor: high (inhibitor)
Title: GRUB Legacy is used on the system
Summary: Leapp detected GRUB Legacy to be installed on the system. The GRUB Legacy bootloader is unsupported on RHEL7 and GRUB2 must be used instead. The presence of GRUB Legacy is possible on systems that have been upgraded from RHEL 6 in the past, but required manual post-upgrade steps have not been performed. Note that the in-place upgrade from RHEL 6 to RHEL 7 systems is in such a case considered as unfinished.

GRUB Legacy has been detected on following devices:
/dev/vda

Related links:
    - How to install GRUB2 after a RHEL6 to RHEL7 upgrade: https://access.redhat.com/solutions/2643721
Remediation: [hint] Migrate to the GRUB2 bootloader on the reported devices. Also finish other post-upgrade steps related to the previous in-place upgrade, the majority of which is a part of the related preupgrade report for upgrades from RHEL 6 to RHEL 7.If you are not sure whether all previously required post-upgrade steps have been performed, consider a clean installation of the RHEL 8 system instead. Note that the in-place upgrade to RHEL 8 can fail in various ways if the RHEL 7 system is misconfigured.
Key: cb875a7c4a8d115b11659324aaca785f9e45ff72

I will try it yet on IBM Z arch (as I have it now by my hand) and in case tests pass, I am merging.

Update: Tested manually following scenarious:

As actors are now present in el7toel8 repos and we do not expect this to be a valid case for IPU 8 -> 9, I did all testing just for IPU 7 -> 8.

Also, it's not expected to cover the detection for EFI boot as discussed internally due to capacities and very minor number of machines that actually upgraded from RHEL 6 to RHEL 7 using EFI boot.