Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 433746 - sys-fs/udev-189: Existing persistent net rules are ignored
Summary: sys-fs/udev-189: Existing persistent net rules are ignored
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-03 08:14 UTC by James Le Cuirot
Modified: 2012-11-28 10:37 UTC (History)
3 users (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 James Le Cuirot gentoo-dev 2012-09-03 08:14:52 UTC
I've been using the same old persistent net rules for quite some time and they worked fine until I updated from udev 186 to 189. I realise that the scripts for writing persistent rules have gone but I think that was already the case in 186. The existing rules should still work though. My /etc/udev/rules.d/70-persistent-net.rules file is as follows.

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6c:f0:49:51:d7:e3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6c:f0:49:51:d7:f3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Under udev 189, it loads these two the wrong way round. I've tried fiddling with the rules like removing ATTR{type} and calling them something other than eth* but to no avail. I've had to drop back to 186 for the moment so I can get my connection back.

Portage 2.1.11.12 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r2, 3.5.3-gentoo x86_64)
=================================================================
System uname: Linux-3.5.3-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_K_875_@_2.93GHz-with-gentoo-2.2
Timestamp of tree: Sat, 01 Sep 2012 20:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p29
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13::<unknown repository>, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.3, 1.12.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            3.4.6-r2, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo symphony Mythtv-Ebuilds java-overlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.virginmedia.com ftp://mirror.qubenet.net/mirror/gentoo http://gentoo.osuosl.org"
INSTALL_MASK="/etc/asterisk /usr/lib64/distcc/bin"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB"
MAKEOPTS="-j8"
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="/usr/local/portage /var/lib/layman/MythTV/Gentoo /var/lib/layman/java-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="16bit 16k 32k 3ds 48k 7zip S3TC X X509 a52 aac aalib acpi aften aim alaw allegro amd amd64 amr amrnb amrwb asf async audiofile autoipd barcode bash-completion bcp berkdb bjam blender-game bluetooth bmp bogofilter boost branding bzip2 cairo cap cardbus cdaudio cdda cddb cdio cdparanoia cdr cdrom cdsound cegui cgi chardet cleartype cli community console consolekit cracklib crosscompile crypt cscope css ctype cups curl cxx dba dbus dc1394 device-mapper devil dhcp directfb divx dri dts dv dvb dvd dvdnav dvdr dvdread effects emf emoticon enca encode equalizer exceptions exif faac faad fam fastcgi fat fb fbcon fbcondecor fbdev fbsplash ffmpeg fftw filter firefox firefox3 flac fluidsynth fmod fontconfig ftp fuse g3dvl g722 g729 gallium gbm gd gdbm gdu geos gif gimp gimpprint git gkrellm glitz glut gmp gnutls gphoto2 gpm grammar gs gsl gsm gstreamer gtk gudev guitarhero hash hddtemp hires-icons hog http hwdb icon iconv icq icu id3 id3tag ieee1394 ilbc image imagemagick imap imlib inkjar islsm_2.5.8.0 ithreads j2me jabber jack-tmpfs java5 java6 javascript jdbc4 jfs joystick jpeg json kdrive keymap kvm ladcca ladspa lame libffi libnotify libsamplerate libv4l2 libvisual lights lighttpd lirc live lj llvm lm_sensors lufsusermount lvm lzo m17n-lib mad maildir matroska mbox mbrola md5sum mdnsresponder-compat midi mikmod ming minizip mmap mmx mmxext mod modplug modules mozbranding mozembed moznocompose moznoirc moznomail mozp3p mozsvg mp2 mp3 mp4 mpeg mpeg2 mpeg4 mplayer mpx msn mudflap multilib musepack music mvl mysql mysqli mythtv ncurses network nfs nfsidmap nfsv3 nfsv4 no-seamonkey nocd nosamples nptl nsplugin ntfs ntfsprogs offensive ogg openal opencore-amr opengl openmp openssl openvg openxml pam pcre pdf pg-intdatetime phonehome png pnm policykit posix postgres ppds pppd pulseaudio qmax qt3support qt4 quicktime rar readline realmedia reiserfs rtc rtsp samba sasl scanner scenarios scrobbler sdl sdl-image sdl-sound sdlaudio secure-delete session sha512 simplexml skins slang smp sndfile soap sockets socks5 sound soundex sounds soundtouch sox speex spell sse sse2 sse3 sse4 sse4a ssl ssse3 startup-notification stemmer stream subversion svg svgz sysfs sysvipc taglib textures tga theora thesaurus threads thumbnail thunar tiff timidity tordns transparent-proxy truetype type1 udev udisks uk_rt ulaw unicode unzip upnp usb userlocales utf8 v4l v4l2 vcd vdpau vhosts videos vispatch vnc vncviewer vorbis vpx wav web webgl webkit webm webp wideband wifi win32 win64 wma wmf wmp x264 xattr xcb xchattext xcomposite xext xface xfce xfs xft xml xmms2 xosd xpm xprint xrandr xsl xulrunner xv xvid xvmc xvnc yahoo zip zlib zsh-completion" ALSA_CARDS="intel-hda" 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 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" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" LIRC_DEVICES="devinput" NGINX_MODULES_HTTP="access autoindex fastcgi geoip gzip proxy rewrite ssi" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 William Hubbs gentoo-dev 2012-09-07 15:37:54 UTC
(In reply to comment #0)
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="6c:f0:49:51:d7:e3", ATTR{type}=="1", KERNEL=="eth*",
> NAME="eth0"
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="6c:f0:49:51:d7:f3", ATTR{type}=="1", KERNEL=="eth*",
> NAME="eth1"
> 
> Under udev 189, it loads these two the wrong way round. I've tried fiddling
> with the rules like removing ATTR{type} and calling them something other
> than eth* but to no avail. I've had to drop back to 186 for the moment so I
> can get my connection back.

I was informed on #udev that you cannot just swap the device names now; you have to name them something completely different, so try this:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="6c:f0:49:51:d7:e3", ATTR{type}=="1", KERNEL=="eth*",
NAME="lan0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="6c:f0:49:51:d7:f3", ATTR{type}=="1", KERNEL=="eth*",
NAME="lan1"

Let me know if that works for you.
Comment 2 James Le Cuirot gentoo-dev 2012-09-08 14:51:58 UTC
I tried this before but it didn't work, maybe because I only ran udevadm trigger instead of rebooting. I tried again and it worked this time so thanks. But please mention this somewhere, I didn't find it documented *anywhere*.
Comment 3 William Hubbs gentoo-dev 2012-09-10 22:48:17 UTC
I have added ewarns to the ebuild with more information on this issue
and pointing to the examples I gave you.

Thanks for the report.
Comment 4 kfm 2012-10-26 21:00:08 UTC
Although this bug is closed, those that stray upon it may be interested in this remark:

https://bugzilla.redhat.com/show_bug.cgi?id=782145#c3

In a nutshell, renaming to within the eth* namespace was never safe. I found the upstream bug after learning this the hard way. This also explains why the automatic rule generator functionality was removed.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-11-28 10:37:15 UTC
*** Bug 444604 has been marked as a duplicate of this bug. ***