-
Notifications
You must be signed in to change notification settings - Fork 159
Add possibility to add kernel drivers to initramdisk #1081
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
Conversation
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.
Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build. If you need a different version of leapp from PR#42, use To launch regression testing public members of oamg organization can leave the following comment:
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. |
...s/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/files/generate-initram.sh
Fixed
Show resolved
Hide resolved
e2b85fc
to
7762d00
Compare
...ade/common/actors/initramfs/upgradeinitramfsgenerator/libraries/upgradeinitramfsgenerator.py
Outdated
Show resolved
Hide resolved
.../system_upgrade/common/actors/initramfs/checkinitramfstasks/libraries/checkinitramfstasks.py
Outdated
Show resolved
Hide resolved
.../system_upgrade/common/actors/initramfs/checkinitramfstasks/libraries/checkinitramfstasks.py
Outdated
Show resolved
Hide resolved
...ade/common/actors/initramfs/upgradeinitramfsgenerator/libraries/upgradeinitramfsgenerator.py
Outdated
Show resolved
Hide resolved
...ade/common/actors/initramfs/upgradeinitramfsgenerator/libraries/upgradeinitramfsgenerator.py
Show resolved
Hide resolved
7762d00
to
d7f37d6
Compare
.../system_upgrade/common/actors/initramfs/checkinitramfstasks/libraries/checkinitramfstasks.py
Outdated
Show resolved
Hide resolved
...s/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/files/generate-initram.sh
Fixed
Show resolved
Hide resolved
...mmon/actors/initramfs/upgradeinitramfsgenerator/tests/unit_test_upgradeinitramfsgenerator.py
Outdated
Show resolved
Hide resolved
f545ef8
to
f65a67d
Compare
be aware of trailing whitespaces :) |
added template example for the custom actor installing the third-party driver to the description |
f65a67d
to
8cb2a7f
Compare
I've tested the patch using my custom kernel module. The test used a simple custom actor that requested the Pre reboot, upgrade initramfs preprated
In the initramfs
The module is not being added to target initramfsHowever, the kernel module is not being added to the target initramfs - the
The
|
/packit copr-build |
e7c3716
to
b2c8e4a
Compare
Before this change there was no possibility for developers to specify what kernel drivers should be included in the upgrade/target initramfs. This includes third-party drivers, which are necessary for system upgrades in some spefic use cases. Changes include: - A new model `KernelModule` (analogous to the `DracutModule` model) has been created, to handle kernel drivers. - Added an `include_kernel_drivers` field in the `UpgradeInitramfsTasks` model to handle a list of these drivers. - Data in the `include_kernel_drivers` field is processed correctly to detect conflicting paths. - Modified the `generate-iniram.sh` script to accept and process the new data - Added checks for kernel drivers, in the `CheckInitramfsTasks` actor. - Updated the unit-tests accordingly.
b2c8e4a
to
6dacdd6
Compare
I've retested the patch again in the same manner: In upgrade initramfs
In target initramfs
Target Initramfs generator - logs
lsinitrd target_initramfs
lsinitrd upgrade_initramfs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the patch and it works. LGTM
@dkubek I will merge this once the integration tests are done running. |
/rerun |
Copr build succeeded: https://copr.fedorainfracloud.org/coprs/build/6177803 |
Testing Farm request for RHEL-8.6-rhui/6177803 regression testing has been created. |
Testing Farm request for RHEL-7.9-rhui/6177803 regression testing has been created. |
I've performed manually a successful 8>9 upgrade using internal vagrant box. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Given that we need the builds today and manual testing + e2e testing has been done successfully, I'd suggest we merge it.
## Packaging - Requires leapp-framework 5.0 ## Upgrade handling ### Fixes - Add el8toel9 actor to handle directory -> symlink with ruby IRB. (oamg#1076) - Do not try to update GRUB core on IBM Z systems (oamg#1117) - Fix failing upgrades with devtmpfs file systems specified in FSTAB (oamg#1090) - Fix the calculation of the required free space on each partitions/volume for the upgrade transactions (oamg#1097) - Fix the generation of the report about hybrid images (oamg#1064) - Handle correctly the installed certificates to allow upgrades with custom repositories using HTTPs with enabled SSL verification (oamg#1106) - Minor improvements and fixes of various reports (oamg#1066, oamg#1067, oamg#1085) - Update error messages about leapp data files to inform user how to obtain valid data files (oamg#1121) - Update links in various reports (oamg#1062, oamg#1086) - Update the repomap data to cover changed repoids in RHUI Azure (oamg#1087) - [IPU 7 -> 8] Fix false positive report about invalid symlinks on RHEL 7 (oamg#1052) - [IPU 8 -> 9] Inhibit the upgrade when unsupported x86-64 microarchitecture is detected (oamg#1059) ### Enhancements - Include updated leapp data files in the RPM (oamg#1046, oamg#1092, oamg#1119) - Update the set of supported upgrade paths (oamg#1077): - RHEL with SAP HANA 7.9 -> 8.6, 8.8 (default: 8.6) - RHEL with SAP HANA 8.8 -> 9.2 - Introduce new upgrade paths: - RHEL 7.9 -> 8.9 (default) - RHEL 8.9 -> 9.3 - Correctly update grub2 when /boot resides on multiple devices aggregated in RAID (oamg#1093, oamg#1115) - Enable upgrades for machines using RHUI on AlibabaCloud (oamg#1088) - Introduce possibility to add kernel drivers to initramfs (oamg#1081) - Redesign handling of information about kernel (booted and target) in preparation for new changes in RHEL 9 (oamg#1107) - Redesign source system overlay to use disk images backed by sparse files to optimize disk space consumption (oamg#1097, oamg#1103) - Requires leapp-framework 5.0 (oamg#1061, oamg#1116) - Use new leapp CLI API which provides better report summary output (oamg#1061, oamg#1116) - [IPU 8 -> 9] Detect and report use of deprecated Xorg drivers (oamg#1078) - [IPU 8 -> 9] Introduce IPU for systems with FIPS enabled (oamg#1053) ## Additional changes interesting for devels - Deprecated `GrubInfo.orig_device_name` field in the `GrubInfo` model (replaced by `GrubInfo.orig_devices`) (oamg#1093) - Deprecated `InstalledTargetKernelVersion` model (replaced by `InstalledTargetKernelInfo`) (oamg#1107) - Deprecated `leapp.libraries.common.config.version.is_rhel_realtime` (check the type in msg `KernelInfo`, field `type`) (oamg#1107) - Deprecated `leapp.libraries.common.grub.get_grub_device()` (replaced by `leapp.libraries.common.grub.get_grub_devices()`) (oamg#1093) - Introduced new devel envar LEAPP_DEVEL_KEEP_DISK_IMGS=1 to skip the removal of the created disk images for OVL. That's sometimes handy for the debugging. (oamg#1097)
## Packaging - Requires leapp-framework 5.0 ## Upgrade handling ### Fixes - Add el8toel9 actor to handle directory -> symlink with ruby IRB. (#1076) - Do not try to update GRUB core on IBM Z systems (#1117) - Fix failing upgrades with devtmpfs file systems specified in FSTAB (#1090) - Fix the calculation of the required free space on each partitions/volume for the upgrade transactions (#1097) - Fix the generation of the report about hybrid images (#1064) - Handle correctly the installed certificates to allow upgrades with custom repositories using HTTPs with enabled SSL verification (#1106) - Minor improvements and fixes of various reports (#1066, #1067, #1085) - Update error messages about leapp data files to inform user how to obtain valid data files (#1121) - Update links in various reports (#1062, #1086) - Update the repomap data to cover changed repoids in RHUI Azure (#1087) - [IPU 7 -> 8] Fix false positive report about invalid symlinks on RHEL 7 (#1052) - [IPU 8 -> 9] Inhibit the upgrade when unsupported x86-64 microarchitecture is detected (#1059) ### Enhancements - Include updated leapp data files in the RPM (#1046, #1092, #1119) - Update the set of supported upgrade paths (#1077): - RHEL with SAP HANA 7.9 -> 8.6, 8.8 (default: 8.6) - RHEL with SAP HANA 8.8 -> 9.2 - Introduce new upgrade paths: - RHEL 7.9 -> 8.9 (default) - RHEL 8.9 -> 9.3 - Correctly update grub2 when /boot resides on multiple devices aggregated in RAID (#1093, #1115) - Enable upgrades for machines using RHUI on AlibabaCloud (#1088) - Introduce possibility to add kernel drivers to initramfs (#1081) - Redesign handling of information about kernel (booted and target) in preparation for new changes in RHEL 9 (#1107) - Redesign source system overlay to use disk images backed by sparse files to optimize disk space consumption (#1097, #1103) - Requires leapp-framework 5.0 (#1061, #1116) - Use new leapp CLI API which provides better report summary output (#1061, #1116) - [IPU 8 -> 9] Detect and report use of deprecated Xorg drivers (#1078) - [IPU 8 -> 9] Introduce IPU for systems with FIPS enabled (#1053) ## Additional changes interesting for devels - Deprecated `GrubInfo.orig_device_name` field in the `GrubInfo` model (replaced by `GrubInfo.orig_devices`) (#1093) - Deprecated `InstalledTargetKernelVersion` model (replaced by `InstalledTargetKernelInfo`) (#1107) - Deprecated `leapp.libraries.common.config.version.is_rhel_realtime` (check the type in msg `KernelInfo`, field `type`) (#1107) - Deprecated `leapp.libraries.common.grub.get_grub_device()` (replaced by `leapp.libraries.common.grub.get_grub_devices()`) (#1093) - Introduced new devel envar LEAPP_DEVEL_KEEP_DISK_IMGS=1 to skip the removal of the created disk images for OVL. That's sometimes handy for the debugging. (#1097)
Before this change there was no possibility for developers to specify what kernel drivers should be included in the upgrade/target initramfs. This includes third-party drivers, which are necessary for system upgrades in some spefic use cases.
Changes include:
KernelModule
(analogous to theDracutModule
model) has been created, to handle kernel drivers.include_kernel_drivers
field in theUpgradeInitramfsTasks
model to handle a list of these drivers.include_kernel_drivers
field is processed correctly to detect conflicting paths.generate-iniram.sh
script to accept and process the new dataCheckInitramfsTasks
actor.Jira ref.: OAMG-4512
BZs: 2175229
Template example: