Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375629 - sys-apps/ifplugd causes startup trouble on baselayout-2
Summary: sys-apps/ifplugd causes startup trouble on baselayout-2
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 08:17 UTC by Matthew Hamilton
Modified: 2011-07-29 05:04 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 Matthew Hamilton 2011-07-19 08:17:40 UTC
I use stable amd64 for my dual-NIC server here at home.  I had ifplugd installed to bring my NICs up and down depending on which port I chose to plug in.

I noticed that several of my services would not start correctly on reboots.  Namely, samba, murmur and NFS would not start on boot.  rc-status showed everything working correctly, with the exception of samba which was marked as "crashed".  Murmur started, but I could not connect to it.  NFS started as well, but I could not mount remotely.

Restarting the services manually fixed the issue and all services worked correctly until the next reboot.

Nothing out of the ordinary in /var/log/rc.log.

I removed ifplugd and set net.eth0 to start manually, and then found that my services came up on boot without issue.

sys-apps/netplug works correctly as well.

The latest ifplugd release was in 2005, perhaps it's time to go?

Reproducible: Always

Steps to Reproduce:
1. emerge sys-apps/ifplugd
2. reboot
3. test network-dependent services
Comment 1 Pacho Ramos gentoo-dev 2011-07-22 12:07:32 UTC
Please attach /var/log/rc.log and /var/log/messages after seeing the failure. Also provide "emerge --info" output
Comment 2 Matthew Hamilton 2011-07-22 20:58:06 UTC
(In reply to comment #1)
> Please attach /var/log/rc.log and /var/log/messages after seeing the failure.
> Also provide "emerge --info" output

This is on my full-time file/web/DB server, so I'll need to wait until late at night to power it down and test across reboots.

I noticed that network services misbehave using netplug as well, so it might be something init-based, instead of the plug services.
Comment 3 Pacho Ramos gentoo-dev 2011-07-28 09:44:50 UTC
Feel free to reopen when replying ;)
Comment 4 Matthew Hamilton 2011-07-29 05:04:28 UTC
I diagnosed the problem, and I can describe why I was having troubles before.

For an idea of my setup, I have a dual-NIC atom server motherboard.  I plug one cable into the router, leaving the other unplugged.

In /etc/rc.conf, I had rc_depend_strict="NO" and rc_hotplug comment out (which defaults to disabled.  I had net.eth0 and net.eth1 assigned to the default runlevel.

On startup, net.eth0 and net.eth1 would start along with ifplugd.  net.eth0 would eventually receive a DHCP lease, while net.eth1 would timeout.

Depending on how quickly other services started up, murmur, samba and ntpd sometimes would start up and start looking for a working net connection prior to the DHCP lease on eth0.

Naturally, not finding any connection to speak of, they would crash or error out.  I would see them in "rc-status" as [crashed].

Removing net.eth1 from the runlevel, along with ifplugd, resulted in a functional system (sometimes).  If a service managed to start before the eth0 lease was established, it would fail regardless.

I set rc_depend_strict="YES" and restarted.  This worked fine, but left me with no eth1 option.  I re-added net.eth1 to the default runlevel and restarted.  With ifplugd, rc_depend_strict="YES" and net.eth0 + net.eth1 in the default runlevel, the network connection would start, but none of the net-dependent services would start.  They were permanently stuck as [scheduled] in rc-status.

I reasoned that since net.eth1 wasn't ever going to start, rc_depend_strict="YES" would never let any net-dependent service start.

On a whim, I removed net.eth0 and net.eth1 from the default runlevel, set rc_hotplug="*" and restarted.

To my surprise, everything works as expected!  net.eth0 and net.eth1 are hotplugged, ifplugd is activated on both NICs, and net-dependent services wait for one to be marked [started] before launching.

I can unplug the cable from eth0, plug it into eth1, and the services stop and start like they should.

Please mark this resolved, but this is strange behavior indeed.  Should this be documented in /etc/rc.conf?