Summary: | sys-fs/udev: Error changing net interface name eth0 to eno1: File exists | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael Haubenwallner (RETIRED) <haubi> |
Component: | Current packages | Assignee: | udev maintainers <udev-bugs> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | eudev |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/systemd/systemd/issues/8994 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Michael Haubenwallner (RETIRED)
2018-05-14 11:05:42 UTC
Apologies, I find this bug hilarious since the whole predictive-renaming thing is supposed to entirely prevent this. So this is a bug in systemd-udev's ruleset for sure. Eudev doesn't maintain those rules, that's all systemd-udev. What I would recommend is something akin to what the old-style rule-generator used to do: add an extra rules file in /etc/udev/rules.d/ that will handle renaming of the igb card: /etc/udev/rules.d/81-fix-broken-nic-naming.rules: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6c:0b:84:aa:de:d3", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="igb0" Please create an issue upstream for this, and give us a link to it so we can track it. https://github.com/systemd/systemd/issues/new?template=Bug_report.md (In reply to Mike Gilbert from comment #2) > Please create an issue upstream for this, and give us a link to it so we can > track it. > > https://github.com/systemd/systemd/issues/new?template=Bug_report.md Wouldn't they require myself to actually use systemd, or is there upstream support for using standalone systemd-udev? How's their opinion about eudev? > Wouldn't they require myself to actually use systemd, or is there upstream support for using standalone systemd-udev? I don't think the developers will give you any trouble, so long as you mention it up front. > How's their opinion about eudev? I suspect they will not care about how it works in eudev. Since the behavior is identical to udev, I would not bother mentioning it. It turns out to be a firmware bug here, let's see if upstream is going to do anything about it.
So I would like to do what floppym suggested in upstream report:
> As a workaround, you could remove onboard from the default NamePolicy setting,
> which should cause udev to use the ID_NET_NAME_PATH value instead. Just copy
> /lib/systemd/network/99-default.link to /etc/systemd/network/99-default.link,
> and remove the word onboard.
But how to do this with sys-fs/eudev, as it does not provide any .link file?
(In reply to Michael Haubenwallner from comment #5) > It turns out to be a firmware bug here, let's see if upstream is going to do > anything about it. > > So I would like to do what floppym suggested in upstream report: > > As a workaround, you could remove onboard from the default NamePolicy setting, > > which should cause udev to use the ID_NET_NAME_PATH value instead. Just copy > > /lib/systemd/network/99-default.link to /etc/systemd/network/99-default.link, > > and remove the word onboard. > > But how to do this with sys-fs/eudev, as it does not provide any .link file? To be honest I'm not sure how one would do this with systemd either -- the current version in centos (the only install I have with systemd right now) doesn't have /lib/systemd/network at all either. I think the udev and eudev equivalent would be to: cp /lib/udev/rules.d/80-net-name-slot.rules /etc/udev/rules.d sed -i '/ID_NET_NAME_ONBOARD/d' /etc/udev/rules.d/80-net-name-slot.rules ..which just removes the rename rule that processes 'ONBOARD'. Alternatively, the solution I mentioned earlier (assigning your own name directly to the igb) would suffice too; with the caveat that you want to have the rules file prefixed with a number smaller than 80, rather than larger (since these rules will abort if 'NAME' is already assigned) (In reply to Ian Stakenvicius from comment #6) > To be honest I'm not sure how one would do this with systemd either -- the > current version in centos (the only install I have with systemd right now) > doesn't have /lib/systemd/network at all either. Upstream removed 80-net-name-slot.rules in systemd-209, moving the name policy logic to .link files. https://github.com/systemd/systemd/commit/daeb71a36a98834664e4d95773a3629b746f4db8 CentOS 7 restores 80-net-name-slot.rules via a patch against systemd-219. I have no idea why they did this instead of installing 99-default.link. https://git.centos.org/blob/rpms!systemd.git/c7/SOURCES!0124-rules-bring-back-80-net-name-slot.rules.patch > I think the udev and eudev equivalent would be to: > > cp /lib/udev/rules.d/80-net-name-slot.rules /etc/udev/rules.d > sed -i '/ID_NET_NAME_ONBOARD/d' /etc/udev/rules.d/80-net-name-slot.rules > > ..which just removes the rename rule that processes 'ONBOARD'. For eudev, that's probably the best option. sys-fs/udev installs and utilizes /lib/systemd/network/99-default.link. |