Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-3318

biosdevname: actor only enabled biosdevname for current kernel version

    • leapp-repository-0.20.0-10.el7_9
    • None
    • None
    • sst_upgrades
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Pass
    • None
    • If docs needed, set a value
    • None

      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.

            leapp-notifications leapp-notifications
            rhn-gps-hjensas Harald Jensas
            leapp-notifications leapp-notifications
            RHEL Upgrades QE Team RHEL Upgrades QE Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: