You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reboot interface still has the name taken from ID_NET_NAME_PATH.
[root@localhost ~]# ip link show enp0s3
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether fa:16:3e:5e:57:fa brd ff:ff:ff:ff:ff:ff
Steps to reproduce the problem
No specific steps except using the above link file.
Additional info
I think that problem is this piece of code in src/udev/net/link-config.c,
/* if we can't get the assgin type, assume we should rename */s=udev_device_get_sysattr_value(device, "name_assign_type");
if (!s)
return true;
r=safe_atou(s, &type);
if (r<0)
return true;
switch (type) {
caseNET_NAME_USER:
caseNET_NAME_RENAMED:
/* these were already named by userspace, do not touch again */return false;
Above code basically ensures that once udev renames the interface using stable name in initrd then it can't be renamed later via link file from real root (I could rename it manually or using initscripts ifcfg DEVICE+HWADDR combo). The obvious solution is to rebuild initrd every time you change Name= stanza in the link file. However, rebuilding initrd is too heavyweight and should be generally avoided if possible and likely even not possible on some systems.
Another reason why we should think about the current policy is that it brings inconsistency as only Name stanza is not applied and rest of the link file is applied.
Yet another reason is the inconsistency with basically any other tool out there that used to do NIC naming. All these tools allow you to rename the interface as many times as you want (though certain conditions must be met e.g. interface must be DOWN).
The text was updated successfully, but these errors were encountered:
systemd version the issue has been seen with
Used distribution
Expected behavior you didn't see
Unexpected behaviour you saw
ID_NET_NAME_PATH
.Steps to reproduce the problem
No specific steps except using the above link file.
Additional info
I think that problem is this piece of code in
src/udev/net/link-config.c
,Above code basically ensures that once udev renames the interface using stable name in initrd then it can't be renamed later via link file from real root (I could rename it manually or using initscripts ifcfg DEVICE+HWADDR combo). The obvious solution is to rebuild initrd every time you change Name= stanza in the link file. However, rebuilding initrd is too heavyweight and should be generally avoided if possible and likely even not possible on some systems.
Another reason why we should think about the current policy is that it brings inconsistency as only Name stanza is not applied and rest of the link file is applied.
Yet another reason is the inconsistency with basically any other tool out there that used to do NIC naming. All these tools allow you to rename the interface as many times as you want (though certain conditions must be met e.g. interface must be DOWN).
The text was updated successfully, but these errors were encountered: