Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189014 - udev errors renaming dummy interface
Summary: udev errors renaming dummy interface
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-15 16:04 UTC by Michalis Giannakidis
Modified: 2007-08-16 14:01 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 Michalis Giannakidis 2007-08-15 16:04:38 UTC
I have a /etc/conf.d/net file which renames my dummy0 interface to dum0:

config_dummy0=( "null" )
config_dum0=( "null" )
rename_dummy0="dum0"
mac_dum0="00:13:02:2A:A0:40"

and I start dum0 as a service by having net.dummy0 in the default runlevel.

During system start up, dum0 is setup and started correctly, but I get  the following error:

 * Starting gpm ...                                                       [ ok ]
 * Starting dummy0
 *   Renaming "dummy0" to "dum0" ...                                      [ ok ]
 *   Stopped configuration of dummy0 due to renaming
 * Starting dum0
 *   Changing MAC address of dum0 ...                                     [ ok ]
 *     changed to 00:13:02:2A:A0:40
 *   Starting ifplugd on dum0 ...                                         [ ok ]
 *     Backgrounding ...
 * ERROR:  cannot start netmount as net.dummy0 could not start

After start up, dummy0 is stopped and dum0 is started.

Should the interface renaming change propagate in the system start up so that the ERROR is silenced?



Reproducible: Always

Steps to Reproduce:
1. System start up



Portage 2.1.2.9 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.20-gentoo-r4_x86_pc i686)
=================================================================
System uname: 2.6.20-gentoo-r4_x86_pc i686 Intel(R) Pentium(R) M processor 1.60GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 12 Aug 2007 09:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium-m -fomit-frame-pointer -pipe"
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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O3 -march=pentium-m -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS=" http://ftp.ntua.gr/pub/linux/gentoo/ ftp://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.physics.auth.gr/pub/mirrors/gentoo/ http://files.gentoo.org"
LANG="el_GR.UTF-8"
LINGUAS="en el"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa apm arts asf avi berkdb bitmap-fonts cairo cdr cli cracklib crypt css cups dbus divx4linux dri dv dvd dvdr dvdread eds emboss encode esd evo fam fame ffmpeg firefox foomaticdb fortran gdbm gif gnome gpm gstreamer gtk hal iconv ieee1394 ipv6 isdnlog jpeg kde kerberos ldap lm_sensors logrotate mad midi mikmod mmx mmxext mp3 mpeg mudflap mysql ncurses nls nptl nptlonly ogg opengl openmp oss pam pcmcia pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl subtitles svg symlink tcpd tiff truetype truetype-fonts type1-fonts unicode usb vorbis wifi win32codecs x86 xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en el" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-08-15 16:32:30 UTC
We're phasing the renaming of interfaces out of baselayout - use a udev rule instead.
Comment 2 Michalis Giannakidis 2007-08-15 18:26:17 UTC
I try to rename the dummy0 interface using udev, be adding in  /etc/udev/rules.d/70-persistent-net.rules:

# rename dummy0 to dum0 (line 16 is bellow)
SUBSYSTEM=="net", KERNEL="dummy0", NAME="dum0"

but I get this error when booting:
Aug 15 21:18:07 makis udevd[510]: add_to_rules: invalid KERNEL operation
Aug 15 21:18:07 makis udevd[510]: add_to_rules: invalid rule /etc/udev/rules.d/70-persistent-net.rules:16'

It seems to my that dummy0 does not yet exist, since net.dummy0 has not been started.

After net.dummy0 has started. I get from udevinfo
udevinfo -a -p /sys/class/net/dummy0
  looking at device '/class/net/dummy0':
    KERNEL=="dummy0"
    SUBSYSTEM=="net"
    DRIVER==""
    ATTR{weight}=="0"
    ATTR{tx_queue_len}=="0"
    ATTR{flags}=="0xa3"
    ATTR{mtu}=="1500"
    ATTR{operstate}=="unknown"
    ATTR{dormant}=="0"
    ATTR{carrier}=="1"
    ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"
    ATTR{address}=="06:de:bc:ba:89:80"
    ATTR{link_mode}=="0"
    ATTR{type}=="1"
    ATTR{features}=="0x0"
    ATTR{ifindex}=="5"
    ATTR{iflink}=="5"
    ATTR{addr_len}=="6"


How do I write the renaming rule for dummy0 interface?
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-08-16 11:35:50 UTC
Well, it looks correct to me. Assigning to udev.
Comment 4 Matthias Schwarzott gentoo-dev 2007-08-16 11:53:47 UTC
(In reply to comment #2)
> I try to rename the dummy0 interface using udev, be adding in 
> /etc/udev/rules.d/70-persistent-net.rules:
> 
> # rename dummy0 to dum0 (line 16 is bellow)
> SUBSYSTEM=="net", KERNEL="dummy0", NAME="dum0"

Changing the assignment operator (=) for KERNEL to compare (==) should make it work:
SUBSYSTEM=="net", KERNEL=="dummy0", NAME="dum0"

> 
> but I get this error when booting:
> Aug 15 21:18:07 makis udevd[510]: add_to_rules: invalid KERNEL operation
> Aug 15 21:18:07 makis udevd[510]: add_to_rules: invalid rule
> /etc/udev/rules.d/70-persistent-net.rules:16'
> 
> It seems to my that dummy0 does not yet exist, since net.dummy0 has not been
> started.
> 
> After net.dummy0 has started. I get from udevinfo
> udevinfo -a -p /sys/class/net/dummy0
>   looking at device '/class/net/dummy0':
>     KERNEL=="dummy0"
>     SUBSYSTEM=="net"
>     DRIVER==""
>     ATTR{weight}=="0"
>     ATTR{tx_queue_len}=="0"
>     ATTR{flags}=="0xa3"
>     ATTR{mtu}=="1500"
>     ATTR{operstate}=="unknown"
>     ATTR{dormant}=="0"
>     ATTR{carrier}=="1"
>     ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"
>     ATTR{address}=="06:de:bc:ba:89:80"
>     ATTR{link_mode}=="0"
>     ATTR{type}=="1"
>     ATTR{features}=="0x0"
>     ATTR{ifindex}=="5"
>     ATTR{iflink}=="5"
>     ATTR{addr_len}=="6"
> 
> 
> How do I write the renaming rule for dummy0 interface?
> 
see above, just copy and paste should work

SUBSYSTEM=="net", KERNEL=="dummy0", NAME="whatever_you_want_here"
Comment 5 Michalis Giannakidis 2007-08-16 14:01:14 UTC
> Changing the assignment operator (=) for KERNEL to compare (==) should make it
> work:
> SUBSYSTEM=="net", KERNEL=="dummy0", NAME="dum0"

It was my spelling mistake. It works now. 
Thank you.