Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461774 - sys-apps/openrc-0.11.8 ignores rc_depend_strict="NO" at startup
Summary: sys-apps/openrc-0.11.8 ignores rc_depend_strict="NO" at startup
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-15 01:34 UTC by Matthew Stapleton
Modified: 2013-11-08 19:41 UTC (History)
0 users

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 Matthew Stapleton 2013-03-15 01:34:19 UTC
At bootup, all the services that depend on net wait for net.ppp0 in sys-apps/openrc-0.11.8 even though rc_depend_strict="NO" is set in /etc/rc.conf and many other interfaces start before net.ppp0.  This can cause some services to never start and they are forever waiting for net.ppp0 even after it has finished starting.  I also have rc_parallel="YES" and haven't tested with rc_parallel="NO" yet.  I didn't have this problem in openrc-0.9.8.4

"/etc/init.d/net.ppp0 needsme" and "/etc/init.d/net.ppp0 usesme" outputs no services.

Reproducible: Always

Steps to Reproduce:
1.  Reboot Linux
Comment 1 Matthew Stapleton 2013-03-15 03:11:36 UTC
Here is some more info:
  The problem message is "WARNING: <servicename> is scheduled to start when net.ppp0 has started" where <servicename> includes every service that has "need net" as its dependency even if I have rc_need="net.eth0" in /etc/conf.d/<servicename>

net-dialup/ppp version: 2.4.5-r3
net-dialup/rp-pppoe version: 3.8-r2
sha1sum: 62ff1bbd296809e505119018cd624719bb03af9f  /etc/init.d/net.lo

All other net.* files are symlinked to /etc/init.d/net.lo .  All net.* services except for net.lo are in the default runlevel.  net.lo is in the boot runlevel.

The net.ppp0 config in /etc/conf.d/net:
config_ppp0="ppp"
rc_net_ppp0="net.eth1"
link_ppp0="eth1"
plugins_ppp0="pppoe"
username_ppp0='<isp_username>'
pppd_ppp0="noauth
noipdefault
defaultroute
lcp-echo-adaptive
lcp-echo-interval 15
lcp-echo-failure 4
mtu 1456
ipv6 ,"
Comment 2 William Hubbs gentoo-dev 2013-03-15 16:50:47 UTC
(In reply to comment #1)
> Here is some more info:
>   The problem message is "WARNING: <servicename> is scheduled to start when
> net.ppp0 has started" where <servicename> includes every service that has
> "need net" as its dependency even if I have rc_need="net.eth0" in
> /etc/conf.d/<servicename>

What happens if you put this line in /etc/conf.d/<servicename>:

rc_need="!net net.eth0"

Also, I'm not familiar with how ppp works at all, so I want to confirm, do you have net.ppp0 in your default runlevel?
Comment 3 William Hubbs gentoo-dev 2013-03-15 16:55:09 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Here is some more info:
> >   The problem message is "WARNING: <servicename> is scheduled to start when
> > net.ppp0 has started" where <servicename> includes every service that has
> > "need net" as its dependency even if I have rc_need="net.eth0" in
> > /etc/conf.d/<servicename>
> 
> What happens if you put this line in /etc/conf.d/<servicename>:
> 
> rc_need="!net net.eth0"

I just realized this when I hit save, before you do that, try this in /etc/conf.d/net:

rc_net_lo_provide="net"

I want to find out if this is because of us dropping "provide net" from the loopback interface.

Also, please test your original setup with rc_parallel="no" and let me know what happens with that setup.
Comment 4 Matthew Stapleton 2013-03-15 22:33:37 UTC
It looks like adding rc_net_lo_provide="net" to /etc/conf.d/net has fixed the problem.  Also, the problem doesn't occur with rc_parallel="no", but I really try to tweak the dependencies in the /etc/conf.d/ files for each system so I can use rc_parallel="yes" as the startup and shutdown time is greatly increased.
Comment 5 William Hubbs gentoo-dev 2013-03-15 23:25:20 UTC
(In reply to comment #4)
> It looks like adding rc_net_lo_provide="net" to /etc/conf.d/net has fixed
> the problem.  Also, the problem doesn't occur with rc_parallel="no", but I
> really try to tweak the dependencies in the /etc/conf.d/ files for each
> system so I can use rc_parallel="yes" as the startup and shutdown time is
> greatly increased.

Thanks for doing this; this shows what the real issue is. Your services which are not starting are misusing "need net".

The fix is to actually remove this line you added then check bug #439092 and the blog entry linked to there for the information on the fix until the new service scripts are stabled.
Comment 6 Matthew Stapleton 2013-03-16 00:53:41 UTC
Okay thanks.  I probably won't be able to help much with figuring out which of those services really need networking, but here is a list of some services/packages that had problems that might not have been updated yet: radvd, http-replicator, syslog-ng (when listening on network ports), tftp-hpa, saslauthd, bind, openvpn, sys-power/nut, dhcpd (from net-misc/dhcp), vsftpd, apache2, asterisk.
Comment 7 szatox 2013-11-08 19:41:04 UTC
This issue might be related
Setup:
net.if1 provides net
net.if2 provides net
rc_depend_strict=NO
net.if1 sometimes fails to start (this is intended)

Problem:
when net.if1 fails to start, openrc does not attempt to start net.if2
starting a service dependent on net fails.

Workaround:
make sure interfaces are up before any service requests them (e.g. add to boot)

Possible reason - regression:
11.8 resolves net to first net.* which is started and provides net. Otherwise it resolves to first net.* service, and only attempts to start this one.

It seems some older openrc tried to start all items providing net, and then carry on whenever any of those started. This probably was the expected behaviour.
Parallel/sequential boot doesn't affect this issue

Talking about misusing rc_need -> It seems rc_depend_strict=no itself serves this purpose. And also simplifying kinda weird configuration a lot.