Bug 2130342
| Summary: | biosdevname: actor only enabled biosdevname for current kernel version | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Harald Jensås <hjensas> |
| Component: | leapp-repository | Assignee: | Leapp Notifications Bot <leapp-notifications-bot> |
| Status: | NEW --- | QA Contact: | upgrades-and-conversions |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.9 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2128268 | ||
Hi, thank you for the report & opening already even the ticket :) For other readers, follow please the attached upstream issue where we started the discussion about the solution: https://github.com/oamg/leapp-repository/issues/970 we will update the BZ ticket when we have an agreement on the right solution. Regarding the reported issue, I am moving it to RHEL 7 as this is about IPU 7 -> 8, so the fix must be delivered on RHEL 7. |
Description of problem: The actor which enables biosdevname only does so for the currently running kernel. When the kernel is updated and the system boots the new kernel biosdevname won't be enabled. Configuration files will reference the biosdevname consisten interface names, but the systemd consistent interface nameing scheme is active. Version-Release number of selected component (if applicable): leapp-repository-deps-el8-5.0.0-100.202004161145Z.de6626f.master.el8.noarch How reproducible: 100% Steps to Reproduce: 1. Run Leapp (RHEL7->RHEL8) on a DELL box which does not explicitly disable biosdevname. 2. Update the kernel after Leapp completed. 3. Actual results: biosdevname is enabled after Leapp. But, only for the kernel version actual during Leapp. When the kernel is later updated, the machine reboots without biosdevname enabled. Can be seen in leapp-upgrade.log - biosdevname was enabled by Leapp: leapp/leapp-upgrade.log:2022-01-26 15:38:06.286 INFO PID: 7786 leapp.workflow.FactsCollection.biosdevname: Biosdevname naming scheme in use, explicitely enabling biosdevname on RHEL-8 Expected results: Leapp should add the kernel argument to enable biosdevname to the defaults, so that kernel update does not fail. Additional info: This actor applies the kernel command line option with: cmd = ['grubby', '--update-kernel=/boot/vmlinuz-{}'.format(kernel_version), '--args="{}={}"'.format(arg.key, arg.value)] When you run grubby with one specific kernel, it will only add the argument to that specific kernel version. Instead, it shoule use --update-kernel=ALL to set it for _all_ kernels See manual page GRUBBY(8). --args=kernel-args When a new kernel is added, this specifies the command line arguments which should be passed to the kernel by default (note they are merged with the arguments of the default entry if --copy-default is used). When --update-kernel is used, this specifies new arguments to add to the argument list. Multiple, space separated arguments may be used. If an argument already exists the new value replaces the old values. The root= kernel argument gets special handling if the configuration file has special handling for specifying the root filesystem. --update-kernel=kernel-path The entries for kernels matching kernel-path are updated. Currently the only items that can be updated is the kernel argument list, which is modified via the --args and --remove-args options. If the ALL argument is used the variable GRUB_CMDLINE_LINUX in /etc/default/grub is updated with the latest kernel argument list, unless the --no-etc-grub-update option is used or the file does not exist (e.g., on s390x). I believe the correct command to use would be: cmd = ['grubby', '--update-kernel=ALL', '--args="{}={}"'.format(arg.key, arg.value)] Using 'ALL' should ensure the option is added to GRUB_CMDLINE_LINUX.