Open stdweird opened 5 months ago
initscripts-rename-device
is the rpm that provides the 60-net rule and also the tool. it required by initscripts
itself.
It is weird that initscripts are deprecated and not installed by default but that a new component provided by RH requires them...
@jouvin it's not required by eg nmstate or networkmanager, i just wanted to point out that anyone relying on these renaming rules will need a replacement if we fully drop initscripts
in my hunt to find what is renming our ibX devices, udev debug log pointed to /usr/lib/systemd/network/99-default.link. these are files defined by https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html, and look prime candidates to have them generated by nmstate component to set eg ethtool params. these can also be use to pin a device name to a mac address
yep, as expected. when specifiying interface names incl the mac address, kickstart generates eg /etc/systemd/network/10-anaconda-ifname-em1.link
# cat /etc/systemd/network/10-anaconda-ifname-em1.link
# Generated by Anaconda based on ifname= installer boot option.
[Match]
MACAddress=aa:bb:cc:dd:ee:ff
[Link]
Name=em1
to integrate this in nmstate, the more complicated procedure of actual renaming might be problematic.
Not sure why/what you want to integrate to nmstate. This part is already done, nmstate must just refer to the new names. At least it seems to work for us (apart from https://github.com/quattor/configuration-modules-core/issues/1671 which for me is unrelated). May be I missed something?
we actually create udev rules at KS to get consistent naming so by the ncm-network runs in ks-post-reboot, all interfaces are correctly named with right Mac address. can share snippet we add in ks.
well, if the ifcfg files exist, they were used to control device names (to some point). now that these files are gone, all kinds of stuff might go wrong. the systemd network link files might be a good solution for it, since they can also be used for setting other parameters
in at least el9.2, there is a
/usr/lib/udev/rules.d/60-net.rules
which basically renames all it can using/lib/udev/rename_device
. however, that tool still (and only?) supports ifcfg files. so we have another side effect of switching to nmstate: we loose some control of naming devices.question is, what do we do with this? ignore, generate the ifcfg files (pins mac address to device name), or generate udev rules?