Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for ARM Upgrades from RHEL8 to RHEL9.5 onwards (GRUB and kernel incompatibility) #1275

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

dkubek
Copy link
Member

@dkubek dkubek commented Aug 8, 2024

This actor addresses an issue encountered during the upgrade process on ARM systems. Specifically, the problem arises due to an incompatibility between the GRUB bootloader used in RHEL 8 and the newer kernels from RHEL 9.5 onwards. When the kernel of the target system is loaded using the bootloader from the source system, this incompatibility causes the bootloader to crash, halting the upgrade.

To mitigate this issue, the following steps are implemented:

Before the Upgrade (handled by AddArmBootloaderWorkaround):

  • Create a new Upgrade EFI entry:

    • A new EFI boot entry is created and populated with the updated RHEL 9 bootloader that is compatible with the new kernel.
  • Preserve the original EFI boot entry and GRUB configuration:

    • The original EFI boot entry and GRUB configuration remain unchanged to ensure system stability.

After the Upgrade (handled by RemoveUpgradeEFIEntry):

  • Remove the upgrade EFI boot entry:
    • The temporary EFI boot entry created for the upgrade is removed to restore the system to its pre-upgrade state.

TODO:

  • Add description of the grub library to docs

JIRA: 41193

Copy link

github-actions bot commented Aug 8, 2024

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:

  • review please @oamg/developers to notify leapp developers of the review request
  • /packit copr-build to submit a public copr build using packit

Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build.
However, here are additional useful commands for packit:

  • /packit test to re-run manually the default tests
  • /packit retest-failed to re-run failed tests manually
  • /packit test oamg/leapp#42 to run tests with leapp builds for the leapp PR#42 (default is latest upstream - master - build)

Note that first time contributors cannot run tests automatically - they need to 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:

  • /packit test --labels kernel-rt to schedule kernel-rt tests set for all upgrade paths
  • /packit test --labels beaker-minimal-8.10to9.4,kernel-rt-8.10to9.4 to schedule kernel-rt and beaker-minimal test sets for 8.10->9.4 upgrade path

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.

@pirat89 pirat89 added this to the 8.10/9.6 milestone Aug 8, 2024
@pirat89 pirat89 added the bug Something isn't working label Aug 8, 2024
@dkubek dkubek force-pushed the arm_bootloader_fix branch from c434dbe to 2e00536 Compare August 19, 2024 10:11
@dkubek
Copy link
Member Author

dkubek commented Aug 24, 2024

/packit copr-build

Copy link

Based on your Packit configuration the settings of the @oamg/leapp Copr project would need to be updated as follows:

field old value new value
bootstrap on default

Packit was unable to update the settings above as it is missing admin permissions on the @oamg/leapp Copr project.

To fix this you can do one of the following:

  • Grant Packit admin permissions on the @oamg/leapp Copr project on the permissions page.
  • Change the above Copr project settings manually on the settings page to match the Packit configuration.
  • Update the Packit configuration to match the Copr project settings.

Please retrigger the build, once the issue above is fixed.

@dkubek dkubek force-pushed the arm_bootloader_fix branch from 0fbc27c to ca62d5b Compare November 7, 2024 11:55
@dkubek dkubek marked this pull request as ready for review November 7, 2024 11:55
@dkubek dkubek force-pushed the arm_bootloader_fix branch 3 times, most recently from bf761fe to 6c9929e Compare November 7, 2024 13:08
Copy link
Member

@matejmatuska matejmatuska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments, other than that it's OK.

@dkubek dkubek force-pushed the arm_bootloader_fix branch from 6c9929e to 680e8fa Compare November 10, 2024 13:58
Address issue with ARM system upgrades from RHEL 8 to RHEL 9.5+ caused
by GRUB bootloader incompatibility with newer kernels. When attempting
to load the RHEL 9.5+ kernel using the RHEL 8 bootloader, the upgrade
process halts due to a boot crash.

JIRA: 41193
@dkubek dkubek force-pushed the arm_bootloader_fix branch from 680e8fa to 6474514 Compare November 10, 2024 14:10
Copy link
Member

@matejmatuska matejmatuska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-wise LGTM

@matejmatuska matejmatuska merged commit abcf7a5 into oamg:main Nov 12, 2024
26 checks passed
@matejmatuska matejmatuska added the changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants