Cloud-init and systemd-udevd fail to rename mlx5_core network interfaces during upgrade from UEK R6 to UEK R7

During an upgrade from UEK R6 to UEK R7 on an Oracle Infrastructure instance, cloud-init and systemd-udevd revert to using the older UEK R6 device naming scheme (ifcfg-ens300f0) for the mlx5_core network interface, rather than correctly renaming the device with the new UEK R7 device naming scheme (ens300f0np0).

To ensure that the mlx5_core network interface does not revert to using the former UEK R6 device naming scheme, do the following after the upgrade to UEK R7 has completed, prior to rebooting the system:

  1. Remove the old network configuration file, for example:

    sudo rm /etc/sysconfig/network-scripts/ifcfg-ens300f0
  2. Remove any cached data saved by cloud-init:

    sudo cloud-init clean
  3. Reboot the instance for the changes to take effect.

(Bug ID 34146775)