Current discussion around https://issues.redhat.com/browse/OCPBUGS-10787 is leaning to shipping at least PoC code in nmstate. Something of the form: nmstatectl pin-nic-names Possibly with options like --active-only (or --ignore-inactive) or `--include-only-glob=enp*` etc. Filing this to track work on this from the nmstate side.
Patch send to upstream: https://github.com/nmstate/nmstate/pull/2306 The whole workflow: * Use `nmstatectl persist-nic-names` to pin __every__ ethernet interface to its MAC via systemd .link file. * After boot into new environment, `nmstatectl persist-nic-names --cleanup` will remove un-required systemd .link file. Key tech point: Use `udevadm test-builtin net_id /sys/class/net/<iface_name>` to check systemd preferred interface name and compare to current interface name. Tested: * CentOS stream 9 VM by renaming a existing interface to new name. * RHEL 8.8 and CentOS stream 9 on Mellanox MT27710: * Not from upgrade, just reinstall CentOS stream 9 and restored the nmstate created .link files.