Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477968 - sys-fs/udev-204: Catastrophic failure with "persistent" network names
Summary: sys-fs/udev-204: Catastrophic failure with "persistent" network names
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-24 06:44 UTC by Patrick Lauer
Modified: 2014-03-01 10:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2013-07-24 06:44:41 UTC
# dmesg | grep eth
[    9.874367] r8169 0000:03:00.0: eth0: RTL8168evl/8111evl at 0xffffc9000002a000, 94:de:80:72:23:9c, XID 0c900800 IRQ 72
[    9.874369] r8169 0000:03:00.0: eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[   10.094085] systemd-udevd[13443]: renamed network interface eth0 to enp3s0
[   10.094207] skge 0000:04:06.0: eth0: addr 1c:af:f7:6f:e3:fe
[   10.094438] skge 0000:04:07.0: eth1: addr 1c:af:f7:6f:f2:66
[   14.366509] skge 0000:04:06.0: eth0: enabling interface
[   14.830784] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   27.362843] skge 0000:04:06.0: eth0: Link is up at 1000 Mbps, full duplex, flow control none
[   27.365875] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready


What can be seen here: if the network cable is not plugged in (or the switch powered off) the network name is different from normal operation.

(In this case the cable was plugged in after net.eth0 started at ~27 seconds post kernel start)

Thus the names flap around between en* and eth* randomly (??!?)

Also while udev claims to rename it obviously fails silently (??!??!?) as eth0 is still there and working (and eth1, eth2 are not renamed ... why?)

Portage 2.1.12.2 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.5.7-gentoo x86_64)
=================================================================
System uname: Linux-3.5.7-gentoo-x86_64-AMD_Athlon-tm-_II_X2_280_Processor-with-gentoo-2.2
KiB Mem:     8233208 total,   8013472 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of tree: Tue, 23 Jul 2013 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5, 3.2.5-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pcre readline session sse sse2 ssl tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Patrick Lauer gentoo-dev 2013-07-24 07:33:41 UTC
The trigger seems to be having /etc/udev/rules.d/70-persistent-net.rules.

Removing it switches to the "new" naming nonsense.

Using the kernel parameter "net.ifnames=0" randomizes the devices so that startup is still not clean - eth2 becomes eth0, maybe. Or not. Does it smell like Thursday?


So, hmm ... there's no consistency in the naming at all anymore.
Comment 2 Egor Y. Egorov 2013-07-24 08:27:46 UTC
Can you please show content of /etc/udev/rules.d/80-net-name-slot.rules ?
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2013-07-24 08:37:34 UTC
(In reply to Patrick Lauer from comment #1)
> The trigger seems to be having /etc/udev/rules.d/70-persistent-net.rules.

Like the Portage news item for the udev upgrade said, you can either delete it or convert it to be compatible by eg. changing eth0 to lan0, eth1 to lan1, wlan0 to wireless0, and so forth -- to use non-kernel namespaces

> Removing it switches to the "new" naming nonsense.

Right, the new naming nonsense as you call is the upstream (and Gentoo) default
And it scales also to enx* MAC based names, or you can simply use the previously mentioned custom names based on MAC if you need to constantly (for whatever reason) edit the hardware / BIOS order

> Using the kernel parameter "net.ifnames=0" randomizes the devices so that
> startup is still not clean - eth2 becomes eth0, maybe.
> Or not. Does it smell like Thursday?

As expected, net.ifnames=0 disables /lib/udev/rules.d/80-net-name-slot.rules and uses random kernel names

> So, hmm ... there's no consistency in the naming at all anymore.

Umm, yes there is. Multiple different ones available, only the kernel naming is random

Closing then, I don't see anything to do here. Besides, I'm pretty sure you already know all this and I'm wondering what this bug is really about.
Comment 4 Patrick Lauer gentoo-dev 2013-07-24 09:25:17 UTC
Oh buggery.

There's a distinct visible failure where udev claims to rename and doesn't

There's a distinct failure where behaviour depends on the network link status.

Don't try to ignore errors like that ...
Comment 5 Egor Y. Egorov 2013-07-24 09:28:26 UTC
(In reply to Patrick Lauer from comment #4)
> Oh buggery.
> 
> There's a distinct visible failure where udev claims to rename and doesn't
> 
> There's a distinct failure where behaviour depends on the network link
> status.
> 
> Don't try to ignore errors like that ...

On my three PC this bug not reproduced.
What about comment #2 ?
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2013-07-24 09:41:36 UTC
(In reply to Patrick Lauer from comment #4)
> Oh buggery.
> 
> There's a distinct visible failure where udev claims to rename and doesn't

Dunno, just partial grep visible here.  Perhaps the error handling when there's bogus net .rules should be better, I'm not sure.

> There's a distinct failure where behaviour depends on the network link
> status.

But you just said it depended on existance of bogus 70-persistent-net.rules!? 

> Don't try to ignore errors like that ...

I don't know what errors you are talking about, all I see is random'ish grep on dmesg. Provide those logs after flipping

/etc/conf.d/udev:

udev_debug="YES"
udev_monitor="YES"

/etc/udev/udev.conf:

udev_log="info"

More output in dmesg as well as /run/udev*.log. Attach full logs, and dmesg
Comment 7 William Hubbs gentoo-dev 2013-07-26 15:57:42 UTC
Are you trying to rename network cards within the kernel name space, e.g. rename eth2 to eth1? If so, you are right, udev doesn't allow this. Actually the kernel never allowed it; there was code in udev for a while that made it possible. You should use custom names for your interfaces that are not eth# or wlan#.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2014-03-01 10:07:13 UTC
Patrick reminded me of this old issue today at #gentoo-udev, Freenode. 

I believe this is what he was discussing about:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=58a6e9039afcb0bf6b712f51fd1f4a9efd0eb1c9

The bug was in udev-206 which was never stabilized.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2014-03-01 10:08:01 UTC
Well, maybe the bug was already in 204, but luckily we don't have that version in tree anymore. :-)