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

Persistent NIC naming: instead of generating .link files set net.naming-scheme= [rhel-9]

    • rhel-sst-upgrades
    • 26
    • 6
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • Leapp: 9.7 & 10.1
    • None
    • None
    • None

      this is clone of https://issues.redhat.com/browse/RHEL-23473 for IPU 9 -> 10. As the solution could not be applied for IPU 9 -> 10 in time this ticket has been created due to missing rhel-net-naming-sysattrs RPM in RHEL 10 repositories - the package is expected to be delivered by kernel later.

      Goal

       

      When we are upgrading from rhel8 to rhel9, the name of NIC can change due to two reasons:

      A) udev changed the way how the name is composed

      B) kernel added a new attribute in /sys/class/net/CARD

       

      Previously in LEAPP we solved this by writing .link files that directly bonded the old name from rhel8 to a specific mac address and we have not used names generated by udev.

       

      But now in udev we are versioning the changes, so you can get to old behavior and we have also added a possibility to allowlist sysfs attributes that can be read by udev. This means together with a database of kernel changes the new udev can mimick the behavior of a version from an older release. 

      All you need to do is to install  rhel-net-naming-sysattrs rpm package and set net.naming-scheme on kernel cmdline (for example for update from 8.10 to 9.4, you need to set net.naming-scheme=rhel-8.10 )

      The RPM and kernel cmdline option needs to be present both in update initrd and in the updated system. With that you can drop the generation of link files. In the case that the link files are still present they will take the priority.

       

      For detail information please see 

      https://issues.redhat.com/browse/RHELBU-2374 and man systemd.net-naming-scheme

       

      Please reach either to me lnykryn@redhat.com or  mschmidt@redhat.com . Michal can also probably provide some contacts for kernel QE that should have machines suitable for testing.

      pstodulk notes:

      • We will want to keep for a while probably the old solution too (RHEL 7 will not be completely dead immediately), from that point, I expect to deactivate the original solution for IPU from RHEL 8.8+ and introduce something like LEAPP_NICS_RENAMING_FALLBACK envar where in case of some unexpected issues we would have a way to let people do it as they originally wanted
      • We need to discuss behaviour of LEAPP_NO_NETWORK_RENAMING=1 - whether we want to keep our hands of from any network handling when it's used or whether it becomes deprecated and used only in combination with LEAPP_NICS_RENAMING_FALLBACK=1.
      • The solution does not cover third-party network drivers. That's not a big problem as handling of third-party functionality is on customer and it is not
        supported by RH.

              leapp-notifications leapp-notifications
              lnykryn@redhat.com Lukáš Nykrýn
              Michal Hecko Michal Hecko
              Pavel Holica Pavel Holica
              Miriam Portman Miriam Portman
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: