Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253416 - =sys-apps/openrc-0.4.1-r1 tries to mount network fs before network is up
Summary: =sys-apps/openrc-0.4.1-r1 tries to mount network fs before network is up
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 260467 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-02 05:16 UTC by Matthew Schultz
Modified: 2010-02-10 23:32 UTC (History)
2 users (show)

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


Attachments
/etc/rc.conf (rc.conf,3.93 KB, text/plain)
2009-01-02 05:17 UTC, Matthew Schultz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Schultz 2009-01-02 05:16:13 UTC
=sys-apps/openrc-0.4.1-r1 tries to mount network file systems before network is up.  I don't know if this is an issue with nfs but this does seem to be a problem with cifs mounts listed in /etc/fstab.  /etc/init.d/netmount should not attempt to mount network shares before the network interface is up.

Reproducible: Always

Steps to Reproduce:
1. Place a cifs mount in /etc/fstab so it automounts on boot
2. reboot

Actual Results:  
Does not mount and gives this error in /var/log/messsages:

Jan  1 22:52:14 aragorn CIFS VFS: Error connecting to socket. Aborting operation
Jan  1 22:52:14 aragorn CIFS VFS: cifs_mount failed w/return code = -101

Expected Results:  
Network shares mount after the network interface is up.

emerge --info
Portage 2.1.6.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.28-gentoo i686)
=================================================================
System uname: Linux-2.6.28-gentoo-i686-mobile_AMD_Athlon-tm-_XP-M_3200+-with-glibc2.0
Timestamp of tree: Thu, 01 Jan 2009 06:15:02 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.1-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
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.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer"
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"
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="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://portage.home http://lug.mtu.edu/gentoo/ http://gentoo.netnitco.net "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
MAKEOPTS="-j3"
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/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://server.home/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi adns alsa apache2 audiofile avi bcmath bdf berkdb bzip2 calendar caps cddb cdparanoia cdr cjk clamav cli cpudetection cracklib crypt ctype cups curl curlwrappers dbus directfb dri dts dvb dvd dvdnav dvdread encode exif fbcon ffmpeg flac foomaticdb fortran ftp gd gdbm gif glib gmp gnutls gpm gstreamer gtk gtk2 hal hash iconv ieee1394 imagemagick imap imlib innodb ipv6 isdnlog java javascript jpeg jpeg2k kde kson lcms ldap ldap-sasl libcaca live logrotate lzo mad matroska mcal mhash midi mime mjpeg mmx mmxext mng mp2 mp3 mp4 mpeg mplayer msession msn mudflap mysql mysqli ncurses network nls nptl nptlonly nsplugin nss nvidia offensive ogg openal opengl openmp osc oss pam pch pcntl pcre pdf pdo perl php png posix ppds pppd python qt3 qt3support qt4 quicktime readline reflection rtc samba sasl sdl seamonkey session simplexml snmp soap sockets spell spl sqlite sse ssl subversion suhosin svg sysfs tcpd theora tidy tiff tokenizer transcode truetype unicode usb v4l v4l2 vcd vorbis wddx win32codecs wxwindows x264 x86 xforms xine xinetd xml xorg xpm xv xvid xvmc zip 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Matthew Schultz 2009-01-02 05:17:01 UTC
Created attachment 177062 [details]
/etc/rc.conf

my rc.conf file
Comment 2 Matthew Schultz 2009-01-02 05:18:07 UTC
Example cifs mount in /etc/fstab:

//server/mythtv                         /home/mythtv           cifs    password=,iocharset=utf8 0 0
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-19 17:58:08 UTC
/etc/init.d/netmount has "need net" so it should not start before network starts. There may be a timing issue though, I think.

Still a problem with 0.5.3?
Comment 4 Matthew Schultz 2009-12-19 23:03:36 UTC
(In reply to comment #3)
> /etc/init.d/netmount has "need net" so it should not start before network
> starts. There may be a timing issue though, I think.
> 
> Still a problem with 0.5.3?
> 

I think I found the problem with it and this is still a problem with 0.5.3.  It will start netmount if rc_depend_strict="NO".  If rc_depend_strict="YES" then it will wait and mount like it's supposed to.
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-22 00:07:15 UTC
*** Bug 260467 has been marked as a duplicate of this bug. ***
Comment 6 Trevor Summers Smith 2010-02-09 18:42:18 UTC
This bug appears to be due to the configuration file setting rc_depend_strict="NO" (as can be seen in the attachment). Specifically, net.lo provides net, which then satisfied the netmount need for network. 

By default rc_depend_strict="YES" on all current versions of OpenRC.

Because of this sensible default I think this bug should be closed.
Comment 7 Matthew Schultz 2010-02-09 21:05:11 UTC
(In reply to comment #6)
> This bug appears to be due to the configuration file setting
> rc_depend_strict="NO" (as can be seen in the attachment). Specifically, net.lo
> provides net, which then satisfied the netmount need for network. 
> 
> By default rc_depend_strict="YES" on all current versions of OpenRC.
> 
> Because of this sensible default I think this bug should be closed.
> 

Huh?  How does net.lo provide net?  Here's a scenario:  You have net.eth0 and net.wlan0.  You only want to use one or the other at a time.  If you have net.eth0 come up by default on boot and not net.wlan0, then netmount won't run because it wouldn't satisfy rc_depend_strict.  If that's what you're expecting, that's great but if you set it to no, then it should still run if net.eth0 or net.wlan0 comes up, which is not happening and that's why this is a bug.
Comment 8 William Hubbs gentoo-dev 2010-02-10 00:15:24 UTC
(In reply to comment #7)
> Huh?  How does net.lo provide net?  Here's a scenario:  You have net.eth0 and
> net.wlan0.  You only want to use one or the other at a time.  If you have
> net.eth0 come up by default on boot and not net.wlan0, then netmount won't run
> because it wouldn't satisfy rc_depend_strict.  If that's what you're expecting,
> that's great but if you set it to no, then it should still run if net.eth0 or
> net.wlan0 comes up, which is not happening and that's why this is a bug.

net.lo does provide net,  along with net.eth0 and net.wlan0.

I need more information about your system.

Which runlevel is netmount in?  Also, how are you switching between net.eth0 and net.wlan0?
Comment 9 Matthew Schultz 2010-02-10 16:24:51 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Huh?  How does net.lo provide net?  Here's a scenario:  You have net.eth0 and
> > net.wlan0.  You only want to use one or the other at a time.  If you have
> > net.eth0 come up by default on boot and not net.wlan0, then netmount won't run
> > because it wouldn't satisfy rc_depend_strict.  If that's what you're expecting,
> > that's great but if you set it to no, then it should still run if net.eth0 or
> > net.wlan0 comes up, which is not happening and that's why this is a bug.
> 
> net.lo does provide net,  along with net.eth0 and net.wlan0.
> 
> I need more information about your system.
> 
> Which runlevel is netmount in?  Also, how are you switching between net.eth0
> and net.wlan0?
> 

I was siting net.wlan0 as an example. The system I was having a problem with and still has a problem only has net.eth0.  I need to test this on my laptop as well to test the net.wlan0 scenario as well.  This should be fairly easy to test though since it happens on a computer with just one network interface anyway.  I set rc_depend_strict to no and net.eth0 and netmount are set up to start on the default runlevel.  ifplugd is also installed.
Comment 10 Matthew Schultz 2010-02-10 16:26:43 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > Huh?  How does net.lo provide net?  Here's a scenario:  You have net.eth0 and
> > > net.wlan0.  You only want to use one or the other at a time.  If you have
> > > net.eth0 come up by default on boot and not net.wlan0, then netmount won't run
> > > because it wouldn't satisfy rc_depend_strict.  If that's what you're expecting,
> > > that's great but if you set it to no, then it should still run if net.eth0 or
> > > net.wlan0 comes up, which is not happening and that's why this is a bug.
> > 
> > net.lo does provide net,  along with net.eth0 and net.wlan0.
> > 
> > I need more information about your system.
> > 
> > Which runlevel is netmount in?  Also, how are you switching between net.eth0
> > and net.wlan0?
> > 
> 
> I was siting net.wlan0 as an example. The system I was having a problem with
> and still has a problem only has net.eth0.  I need to test this on my laptop as
> well to test the net.wlan0 scenario as well.  This should be fairly easy to
> test though since it happens on a computer with just one network interface
> anyway.  I set rc_depend_strict to no and net.eth0 and netmount are set up to
> start on the default runlevel.  ifplugd is also installed.
> 

IP is set as an internal static IP.
Comment 11 William Hubbs gentoo-dev 2010-02-10 18:31:36 UTC
The following is taken from /usr/share/doc/openrc-0.6.1/net.example:

# By default we don't wait for netplug/ifplugd to configure the interface.
# If you would like it to wait so that other services now that network is up
# then you can specify a timeout here.
#plug_timeout="10"
# A value of 0 means wait forever.

In other words, you need to set plug_timeout to some value in /etc/conf.d/net, otherwise, openrc will not wait until the interface is configured, and it sounds like this is what you are experiencing.
Comment 12 William Hubbs gentoo-dev 2010-02-10 18:35:50 UTC
Please report back and let me know if that fixes your issue.

Thanks,

William
Comment 13 William Hubbs gentoo-dev 2010-02-10 23:32:55 UTC
Ok, forget my previous suggestion.

I spoke with upstream and was advised that the correct fix for this is to set things up so that net.lo does not provide net.  The way to do this is to put the following line in /etc/rc.conf:

rc_net_lo_provide="!net"

Please re-open if that doesn't fix your issue.

Thanks,

William