Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 246849 - sys-fs/udev-132 persistent net rules doesn't work on boot
Summary: sys-fs/udev-132 persistent net rules doesn't work on boot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-15 12:24 UTC by Vladimir Berezhnoy
Modified: 2009-01-02 16:30 UTC (History)
6 users (show)

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


Attachments
my 70-persistent-net.rules (70-persistent-net.rules,536 bytes, text/plain)
2008-11-15 12:25 UTC, Vladimir Berezhnoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Berezhnoy 2008-11-15 12:24:06 UTC
After upgrading to sys-fs/udev-132

Reproducible: Always

Steps to Reproduce:
1. upgrade to unstable sys-fs/udev-132
2. reboot


Actual Results:  
For me network interface eth0_rename was not renamed to eth1 on boot. 

Expected Results:  
The interfaces should be named according to my /etc/udev/rules.d/70-persistent-net.rules

This was working fine with sys-fs/udev-130-r1


And I can see following messages in rc.log:

 * Waiting for uevents to be processed ...
 [ ok ]
 * UDEV: Your system has a problem assigning persistent names
 * to these network interfaces:  eth0_rename
 * Checking persistent-net rules:
 * Found no duplicate names in persistent-net rules,
 * there must be some other problem!

Portage 2.2_rc14 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-zen3-home1 i686)
=================================================================
System uname: Linux-2.6.27-zen3-home1-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.0
Timestamp of tree: Fri, 14 Nov 2008 20:32:01 +0000
distcc 3.0 i686-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -msse3 -fomit-frame-pointer -funroll-loops -fforce-addr -ffast-math -ftracer -finline-functions -fexpensive-optimizations -freorder-blocks"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/share/hddtemp/"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe -msse3 -fomit-frame-pointer -funroll-loops -fforce-addr -ffast-math -ftracer -finline-functions -fexpensive-optimizations -freorder-blocks"
DISTDIR="/mnt/big/distfiles~"
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/berkano /usr/local/portage/layman/sunrise /usr/local/portage/layman/swegener /usr/local/portage/layman/oss4 /usr/local/portage/layman/zen-overlay /usr/local/portage/layman/arcon /usr/local/portage/layman/rostov /usr/local/portage/layman/kde-crazy /usr/local/overlays/testing /home/non7top/overlays/arcon/trunk/arcon-overlay /home/non7top/overlays/arcon/trunk/arcon-testing"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dfx 3dnow 3dnowext 7zip X a52 aac acpi addbookmarks additions aften aim akode alias alsa amarok amazon amr amrwb ansi apache2 archive artswrappersuid asf ass atm autoreplace avahi bash-completion bashlogger binary-drivers bittorrent bluetooth bootsplash branding bzip2 cairo captury cdr cgi chm cisco connectionstatus contactnotes cracklib crypt css curl dbus dhcp disk-partition djvu dmi dri dts dvd dvdr dvdread eds emboss emovix enca encode evo exif expat extensions extras fam fat fbcondecor ffmpeg flac fortran ftp gammu gd gdbm geoip gif glib glitz gnokii gphoto2 gpm gstreamer gtalk gtk gzip hal hardenedphp hddtemp highlight history httpd iconv id3 ieee1394 imagemagick imlib insecure-patches isdnlog ithreads jabber javascript jfs jpeg kde kde4 kdeenablefinal kdeprefix kdexdeltas lame ldap libass libextractor libnotify lm_sensors logrotate mad matroska midi mikmod mktemp mmx mmxext mng mouse mozdevelop mozilla mp3 mp4 mpeg mplayer mudflap musicbrainz mysql mysqli nas ncurses nepomuk network nls nodoc nowlistening nptl nptlonly nsplugin ntfs ntlm nvidia obex ogg opengl openmp openntpd oscar pam passwordsave pch pcre perl pertty php plugins png ppds pppd python qt-copy qt3 qt3support qt4 quicktime rcc rdesktop readline reflection samba sasl screen sdl semantic-desktop session simplexml slang smb sndfile spell spl sqlite sqlite3 srt srv sse sse2 ssl startup-notification statistics subtitles subversion svg svnserve swat swscaler sysfs syslog taglib tcpd theora threads threadsafe tiff tordns tos translator trayicon truetype type1 unicode upnp urandom usb utempter vditool vim-syntax visualization vnc vorbis wavpack web win32codecs winbind wrapper wxwindows x264 x86 xcb xcomposite xfs xhtml xine xinetd xml xmlreader xmlrpc xmlwriter xorg xosd xpm xsl xv xvid zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" USERLAND="GNU" VIDEO_CARDS="radeonhd fglrx vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vladimir Berezhnoy 2008-11-15 12:25:29 UTC
Created attachment 171802 [details]
my 70-persistent-net.rules

Attaching my /etc/udev/rules.d/70-persistent-net.rules
Comment 2 emerald 2008-11-15 13:46:04 UTC
Not only persistent net rules seem not to work, persistent disk rules do strange things too, all partition symlinks in /dev/disk/by-id/ are missing, only harddisk links (which was a pain since i use the partition rules in fstab)
Comment 3 Vladimir Berezhnoy 2008-11-15 21:25:08 UTC
And also if I run 'udevadm trigger' after logging in, eth1 appears, so looks like 70-persistent-net.rules gets executed correctly.
Comment 4 Kay Sievers 2008-11-16 23:38:55 UTC
(In reply to comment #2)
> Not only persistent net rules seem not to work, persistent disk rules do
> strange things too, all partition symlinks in /dev/disk/by-id/ are missing,
> only harddisk links

What does:
  udevadm test /block/sda
print for the disk you miss the partition links?
Comment 5 Kay Sievers 2008-11-17 02:23:26 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > Not only persistent net rules seem not to work, persistent disk rules do
> > strange things too, all partition symlinks in /dev/disk/by-id/ are missing,
> > only harddisk links
> 
> What does:
>   udevadm test /block/sda
> print for the disk you miss the partition links?

Oh, maybe you are using the deprecated sysfs layout? We found a problem with block devices and and recent udev versions. I hope it is fixed for the next version. What is SYSFS_DEPRECATED* in your kernel config?
Comment 6 Oschtan 2008-11-17 11:51:00 UTC
rm /etc/udev/rules.d/70-persistent-net.rules
udevadm trigger --subsystem-match=net

It's work!
Comment 7 Roger 2008-11-19 14:45:23 UTC
Right.  Notice "/etc/udev/rules.d/70-persistent-net.rules" was added recently to udev-132 and seems to be the source of all these non-existant devices (such as network eth0, etc).
Comment 8 Kay Sievers 2008-11-19 16:55:09 UTC
(In reply to comment #7)
> Right.  Notice "/etc/udev/rules.d/70-persistent-net.rules" was added recently
> to udev-132 and seems to be the source of all these non-existant devices (such
> as network eth0, etc).

The  "/etc/udev/rules.d/70-persistent-net.rules" file is created on the fly, not added by the "package". I think earlier releases did that too.

Matthias, care to "sed" the "ATTRS" to "ATTR" with the installation?

ATTR should work fine with older releases too, but recent ones seems not to match with DRIVERS at the same device.

We also add KERNEL= to some old rules on package update, because some strange setups have two interfaces with the same MAC address. Which is weird, but fine if they are not connected to the same local net.

That's what we do:
sed -ri \
  '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
  /etc/udev/rules.d/70-persistent-net.rules >/dev/null 2>&1 || :
Comment 9 Matthias Schwarzott gentoo-dev 2008-11-20 15:13:46 UTC
(In reply to comment #8)
> 
> Matthias, care to "sed" the "ATTRS" to "ATTR" with the installation?
> 

> 
> That's what we do:
> sed -ri \
>   '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
>   /etc/udev/rules.d/70-persistent-net.rules >/dev/null 2>&1 || :
> 
both seds are added to udev-133.
This is still masked waiting for further changes and tests.
Comment 10 Matthias Schwarzott gentoo-dev 2008-11-26 11:14:28 UTC
udev-133 is unmasked. Please test.


Comment 11 Badalian Slava 2008-11-28 08:36:57 UTC
udev-133 have BIG trouble!
its save persitent net rules like eth0.100 (vlans!) after reboot its rename eth0 to eth0.100 (but not create vlan! simple rename!) its break system! =)
Comment 12 Matthias Schwarzott gentoo-dev 2008-11-28 11:27:14 UTC
(In reply to comment #11)
> udev-133 have BIG trouble!
> its save persitent net rules like eth0.100 (vlans!) after reboot its rename
> eth0 to eth0.100 (but not create vlan! simple rename!) its break system! =)
> 
This is a NEW issue: Please open a NEW bug for it.
Comment 13 Kay Sievers 2008-11-28 14:37:36 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > udev-133 have BIG trouble!
> > its save persitent net rules like eth0.100 (vlans!) after reboot its rename
> > eth0 to eth0.100 (but not create vlan! simple rename!) its break system! =)
> > 
> This is a NEW issue: Please open a NEW bug for it.

I can not reproduce it here. VLANs do not have a DRIVER, and should therefore not trigger the writing of a new rule.

Comment 14 Matthias Schwarzott gentoo-dev 2008-11-29 15:49:48 UTC
Marking this bug as fixed, as udev-133 seems to work.
Please re-open if it still happens to you.

If you have different issues, please open a new bug.