Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399389 - sys-apps/openrc=0.9.4 stopping hotpluged network service fails if removing the network device
Summary: sys-apps/openrc=0.9.4 stopping hotpluged network service fails if removing th...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard: openrc:oldnet
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 13:57 UTC by Karsten Renhak
Modified: 2013-04-25 23: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 Karsten Renhak 2012-01-19 13:57:31 UTC
If I plug a USB-WLAN-key into my gentoo-box the service net.wlan0 is starting fine according my configuration.
But when I remove the USB-WLAN-key the service net.wlan0 won't stop. Here is the message from the syslog:
/etc/init.d/net.wlan0[11237]: ERROR: net.wlan0 failed to stop

If I run the init script by hand via /etc/init.d/net.wlan0 -d stop the last lines of output are looking like this:

+ for module in '${MODULES}'
++ command -v dhclient_pre_stop
+ '[' '' = dhclient_pre_stop ']'
+ for module in '${MODULES}'
++ command -v vlan_pre_stop
+ '[' vlan_pre_stop = vlan_pre_stop ']'
+ vlan_pre_stop
+ local vlan=
+ _exists
+ grep -Eq '^[[:space:]]*wlan0:' /proc/net/dev
+ return 1
+ exit 1
 * ERROR: net.wlan0 failed to stop

I assume the openrc module irpute2 is calling the function _exists() but it will return 1, because the network device (USB WLAN key) is not connected anymore to the computer.

By the way, it is not an option to call /etc/init.d/net.wlan0 stop before removing the USB key. This machine is intended to act in a university practical exercise, where the students simply have to plug in and remove the WLAN USB key without any user interaction.

The wireless network is a simple ad-hoc network with static ip adresses.



Reproducible: Always

Steps to Reproduce:
1. plug in the WLAN USB key
2. wait a until network is up
3. remove the WLAN USB key
Actual Results:  
The network service (like net.wlan0) will not stop and produce the following message in the syslog:
/etc/init.d/net.wlan0[11237]: ERROR: net.wlan0 failed to stop

Expected Results:  
The service should stop even if the network device is not longer present.

# emerge --info 
Portage 2.1.10.41 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 3.1.6-gentoo x86_64)
=================================================================
System uname: Linux-3.1.6-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_6300_@_1.86GHz-with-gentoo-2.0.3
Timestamp of tree: Thu, 19 Jan 2012 11:45:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo my_local_overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.tu-ilmenau.de/mirror/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/ ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/my_local_overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="64bit 7zip X a52 aac acl acpi activefilter additions adns alsa amd64 amr apng archive bash-completion berkdb binfilter bluetooth branding bzip2 cairo caps cdaudio cdda cddb cdparanoia cdr chm cleartype cli connectionstatus consolekit cracklib crypt css ctype cups custom-optimization cxx dahdi dbus declarative directfb divx dri dts dv dvb dvd dvdnav dvdr dvdread dvipdfm dynamic ebook emboss emf enca encode exif extra faac fam fastcgi fbcon ffmpeg fftw firefox flac fontconfig foomaticdb fortran fping fpx ftp gammu gd gdbm gdu geoip gif gimp git glitz gmedia gnutls gpm graphics graphviz gs gzip h323 handbook hash history humanities iconv id3tag idn ieee1394 imagemagick inotify ipv6 jabber java java6 jbig jce jingle jpeg jpeg2k kde kdehiddenvisibility kerberos kipi kontact kpathsea lame lastfm latex latex3 lcms libkms libnotify lightning lm_sensors logrotate lzma lzo mad matroska mbox md5sum methodjit midi mms mmx mmxext mng modules mp2 mp3 mp4 mpeg mplayer msn mtp mudflap multilib multimedia musepack musicbrainz mysql mysqli ncurses nls nodrm nptl nptlonly nsplugin ntfs obex ocr ogg omega opengl openmp optimized-qmake oscar otr pam pango pcre pdf pgf phonon plasma plotutils png policykit ppds pppd pstricks publishers qt3support qt4 quota rar rdesktop rdp readline realmedia resolvconf rtsp sasl scanner schroedinger science scrobbler sdl semantic-desktop session sftp sip slp smbclient smp speex spell sql sqlite sqlite3 sse sse2 sse3 ssl ssse3 startup-notification stream subversion svg sysfs syslog taglib tcpd templates tex4ht theora threads threadsafe tiff tk truetype type1 udev unicode usb vaapi vdpau video vim-syntax virtuoso vlc vnc vorbis wav webkit wma wmf wmp x264 xattr xcb xcomposite xetex xface xine xinerama xml xorg xosd xscreensaver xterm xulrunner xv xvid xvmc yv12 zlib" 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" 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 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau vesa" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Karsten Renhak 2012-02-03 10:31:15 UTC
The problem seems to be gone with =sys-apps/openrc-0.9.8.4.

After removing the WLAN-USB-Key the hotplugged service net.wlan0 went to state inactive. After adding the WLAN-USB-Key again the network gets configured as expected (like the first time).