[systemd-devel] 70-persistent-net.rules

Colin Guthrie gmane at colin.guthr.ie
Thu Apr 11 04:46:28 PDT 2013


'Twas brillig, and Harald Hoyer at 11/04/13 12:27 did gyre and gimble:
> Am 11.04.2013 12:55, schrieb Reindl Harald:
>>
>>
>> Am 11.04.2013 12:41, schrieb Colin Guthrie:
>>> 'Twas brillig, and Andrey Borzenkov at 11/04/13 10:25 did gyre and gimble:
>>>> On Thu, Apr 11, 2013 at 2:50 AM, Reindl Harald <h.reindl at thelounge.net> wrote:
>>>>> /usr/share/doc/systemd/README.Fedora-18
>>>>>
>>>>> - A hacky workaround that allows udev to rename network interfaces into
>>>>>   kernel's ethX namespace has been re-added. This is to support users who still
>>>>>   rely on udev rules such as 70-persistent-net.rules generated in previous
>>>>>   Fedora releases to name their network interfaces. Note that the workaround is
>>>>>   only temporary and will go away in a future Fedora release
>>>>> ______________________________________
>>>>>
>>>>> PLEASE DO NOT remove this mechanism
>>>>>
>>>>> well, you are not creating it since a long time, BUT do not
>>>>> stop use this config file if it is present!
>>>>>
>>>>
>>>> Mmm ... if rules file exists in correct directory it of course will be
>>>> used. Or do you mean to not remove auto-generation of this file?
>>>
>>> Isn't the mechanism used to shuffle around conflictingly named
>>> interfaces gone from udev these days (it is after all racy and buggy).
>>>
>>> If so then things might not work nicely when processing the old rules.
>>> Users should be strongly encouraged to migrate to the persistent network
>>> interface names which avoids the design flaws inherent with the
>>> previously approach.
>>
>> that is all nice in theory
>> in real life there are THOUSANDS of setups with only one ethernet interface
>> there are THOUSANDS of virtual machines with only one network interface
>> there are THOUSANDS of virtual machines with only two NICs and no race-problems
> 
> Just add "net.ifnames=0 biosdevname=0" to the kernel command line and you don't
> need any 70-persistent-net.rules. Udev will not try to rename your interfaces.
> 
> Only
> $ rpm -qf /lib/udev/rename_device
> initscripts-9.45-2.fc19.x86_64
> 
> kicks in and renames interfaces according to the ifcfg-* files, if HWADDR is
> set, and if there are no conflicts.

It's the "if there are no conflicts" bit that's hard to address tho'
right? I mean, this is what the persistent rules stuff was meant to fix
(but didn't due to the afore mentioned races etc.). If I have two NICs
(quite common) and the kernel happens to initialise them the "wrong" way
round, this logic breaks down does it not? (please correct me if I'm wrong).

Should we then consider trying to push a new default name scheme into
the kernel side such that they come up as "eth-ng0" etc. by default
allowing any userspace stuff to rename them to "eth1" or whatever
without so much likelihood of such conflicts.

That shouldn't affect the udev persistent name scheme, and should allow
people who want to keep the traditional ethX names to carry on with out
*that* much risk of the rename failing.

Just some idle thoughts. I doubt very much the kernel folks would like
it... although I would hope it would be a build time option somehow.

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/



More information about the systemd-devel mailing list