Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252233 - openrc / baselayout-2 - need net broken with multiple net interfaces
Summary: openrc / baselayout-2 - need net broken with multiple net interfaces
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2008-12-23 02:31 UTC by Stephen Cavilia
Modified: 2008-12-26 22:13 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Cavilia 2008-12-23 02:31:42 UTC
On a system with multiple network interfaces (e.g. laptop with ethernet and wifi) and both net.* services in default runlevel, any services that depend on networking will only start if the first enabled interface starts.

Reproducible: Always

Steps to Reproduce:
1. add two or more net.* services to runlevel default
2. make first network fail and second one start normally

Actual Results:  
eth0 fails to start but eth1 does start, rc refuses to start network services after this:

Dec 22 20:59:57 kwyjibo /etc/init.d/pdnsd[4215]: ERROR: cannot start pdnsd as net.eth0 would not start
Dec 22 21:00:00 kwyjibo /etc/init.d/netmount[4275]: ERROR: cannot start netmount as net.eth0 would not start
Dec 22 21:00:22 kwyjibo /etc/init.d/apache2[4437]: ERROR: cannot start apache2 as net.eth0 would not start
Dec 22 21:00:23 kwyjibo /etc/init.d/chronyd[4453]: ERROR: cannot start chronyd as net.eth0 would not start
Dec 22 21:00:27 kwyjibo /etc/init.d/ddclient[4481]: ERROR: cannot start ddclient as net.eth0 would not start

Disabling eth0 will cause these services to depend on eth1, allowing them to start

Expected Results:  
With baselayout-2's rc, services with "need net" will start if ANY non-lo network is available; openrc seems to make them depend specifically on the first one listed in the runlevel.
Comment 1 Wormo (RETIRED) gentoo-dev 2008-12-25 05:52:00 UTC
Please post your 'emerge --info'. Which version of openrc do you have installed?
Comment 2 Stephen Cavilia 2008-12-25 06:39:49 UTC
Portage 2.2_rc11 (default-linux/x86/2007.0/desktop, gcc-4.2.3, glibc-2.7-r2, 2.6.27-gentoo-r6 i686)
System uname: Linux-2.6.27-gentoo-r6-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-glibc2.0
Timestamp of tree: Sun, 21 Dec 2008 18:30:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r4, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.0
sys-devel/autoconf:  2.13, 2.62
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.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
CFLAGS="-march=prescott -O2 -pipe -mfpmath=sse -mmmx -msse -msse2 -msse3"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/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/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -mfpmath=sse -mmmx -msse -msse2 -msse3"
FEATURES="buildpkg distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/overlays/local /usr/local/overlays/gentopia /usr/local/overlays/hboeck /usr/portage/local/layman/musicbrainz /usr/portage/local/layman/catalystframework"
USE="X a52 aac aalib acl acpi administrator aiglx alsa amr apache2 apm applet artworkextra asf audiofile avahi avi bash-completion berkdb bitmap-fonts blender-game bluetooth bonobo bzip2 cairo cdda cdr cgi cli clock-screen cracklib crypt ctype cups curl daap dba dbus dia disk-partition dnd dri dts dvd dvdr dvdread dvi eds emacs emboss encode escreen esd ethereal evo exif expat extraengine extras fam fastbuild fat ffmpeg fftw flac foomaticdb force-cgi-redirect fortran ftp gcj gd gdbm gdl gif gimp gkrellm glib glitz glut gmp gnome gnutls gpgme gphoto2 gpm gps graphviz gs gstreamer gtk gtk2 gtkhtml guile hal howl-compat httpd iconv idn imagemagick imap imlib inkjar innodb ipv6 irmc isdnlog ithreads jack java java5 jfs jpeg jpeg2k kde kdrive kerberos key-screen kqemu ladspa latex lcms ldap libburn libg++ libnotify libsamplerate libwww live lzw mad math mbrola mdnsresponder-compat memlimit midi mikmod mjpeg mmkeys mmx mng modperl mono motif mozdevelop mozilla mozsvg mp3 mp4 mpeg mudflap mule multiuser mysql mysqli nautilus ncurses neXt networking nls nptl nptlonly nsplugin ntfs obex objc objc++ oci8-instant-client offensive ofx ogg openexr opengl openmp oracle oss pam pango pcre pdf pdflib perl perlsuid pidgin plotutils plugin png pop posix postgres postscript ppds pppd prelude proj python qt qt3 qt3support qt4 query-browser quicktime readline reflection reiserfs samba scanner screen sdl seamonkey search-screen session silc simplexml skins slang smime smp smtp sndfile soap sockets speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification stream svg swat symlink sysfs tcl tcltk tcpd test-programs tetex themes theora threads tiff tk tokenizer tracker trayicon truetype truetype-fonts type1-fonts udev unicode upnp usb v4l vcd verse vhosts vlm vorbis webdav win32codecs wmf wxwindows x264 x86 xemacs xforms xfs xml xml2 xorg xprint xscreensaver xsl xulrunner xv xvid zeroconf zlib" ALSA_CARDS="hda-intel usb-audio" 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 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" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="i810"

Comment 3 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-12-26 16:21:22 UTC
I'm sorry but, it seems that you 're wrong here. This happens because by default, in /etc/rc.conf there is the rc_depend_strict="YES" line. If you set it to NO, there won't be any problems like these you describe. I paste the full information about that variable/option from /etc/rc.conf:

# Do we allow any started service in the runlevel to satisfy the depedency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.

I resolve the bug as TEST-REQUEST. Check the above information, and reopen only if you still believe that there is a real bug here. 
Comment 4 Stephen Cavilia 2008-12-26 22:13:21 UTC
Yeah i was looking at rc.conf the other day and found rc_depend_strict (not sure how I missed it the first time during the upgrade other than the fact that the old conf.d/rc had it as no by default for as long as i can remember)