Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445116 - openrc-0.11.5: netmount hangs during shutdown
Summary: openrc-0.11.5: netmount hangs during shutdown
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 439098
  Show dependency tree
 
Reported: 2012-11-28 21:58 UTC by Ciprian Ciubotariu
Modified: 2012-12-03 17:19 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 Ciprian Ciubotariu 2012-11-28 21:58:20 UTC
I have a desktop and a server. Desktop has eth5 getting an IP via DHCP, and mounts some smbfs shares via netmount. All works fine.

Following the upgrade to openrc-0.11.5 netmount is stopped by default after net.eth5, therefore the umount hangs indefinitely.

I have set rc_need="net.eth5 dhcpcd" as instructed by /etc/conf.d/netmount, but this does not seem to help. The only workaround I can find is to set need net in /etc/init.d/netmount, but it seems this is not the desired solution.

As a conclusion, I believe it is a bug in OpenRC, where the rc_need in /etc/conf.d is only accounted for during startup, and not during shutdown.

Reproducible: Always
Comment 1 William Hubbs gentoo-dev 2012-11-29 01:19:12 UTC
(In reply to comment #0)
> I have a desktop and a server. Desktop has eth5 getting an IP via DHCP, and
> mounts some smbfs shares via netmount. All works fine.
> 
> Following the upgrade to openrc-0.11.5 netmount is stopped by default after
> net.eth5, therefore the umount hangs indefinitely.
> 
> I have set rc_need="net.eth5 dhcpcd" as instructed by /etc/conf.d/netmount,
> but this does not seem to help. The only workaround I can find is to set
> need net in /etc/init.d/netmount, but it seems this is not the desired
> solution.

No, you should not touch /etc/init.d/netmount.

Try setting this in /etc/conf.d/netmount:

rc_need="net.eth5"

If that doesn't work, try:

rc_need="net"

Let me know which one works.
Comment 2 SpanKY gentoo-dev 2012-11-29 04:11:40 UTC
as i mentioned in Bug 439660, the netmount defaults have to be smarter
Comment 3 William Hubbs gentoo-dev 2012-11-29 18:47:51 UTC
@Vapier:
Does commit 8661af3 make it more clear?
Comment 4 Ciprian Ciubotariu 2012-11-30 00:45:24 UTC
I have read the commit, which made it clear for me not to mix net.eth5 and dhcpcd in the rc_need settings. However, needing just net.eth5 does not seem to work either; here are the details:

Test 1: rc_need="net.eth5". On reboot I could clearly see that net.eth5 was no longer stopped before netmount, but it still hung. However, I noticed above a line stating "Stopping DHCP Client daemon" above the hung "Unmounting network filesystems". My conclusion is that dhcpcd removed the IP from eth5, and umount hanged, but you would know more about these subtleties.

Test 2: rc_need="net". Rebooted cleanly 2 times.

Test 3: back to rc_need="net.eth5". Rebooted cleanly a few times.

I assume that passing the dependency tree through need=net for netmount changed some ordering in whatever caches live in /lib/rc, so that by accident now the situation where it hangs no longer occurs. However, this points to the fact that your tests should account for such cases.

I can provide more info if you instruct me how.
Comment 5 William Hubbs gentoo-dev 2012-11-30 01:28:10 UTC
(In reply to comment #4)
> Test 1: rc_need="net.eth5". On reboot I could clearly see that net.eth5 was
> no longer stopped before netmount, but it still hung. However, I noticed
> above a line stating "Stopping DHCP Client daemon" above the hung
> "Unmounting network filesystems". My conclusion is that dhcpcd removed the
> IP from eth5, and umount hanged, but you would know more about these
> subtleties.
>
> Test 2: rc_need="net". Rebooted cleanly 2 times.
> 
> Test 3: back to rc_need="net.eth5". Rebooted cleanly a few times.

I should have had you run rc-update -u each time you changed the rc_need setting. It sounds like your cache may not have been updated right away.
Comment 6 William Hubbs gentoo-dev 2012-11-30 18:53:02 UTC
The above-mentioned commit will be included in openrc-0.11.6 to make the
setup more clear.

Please re-open if there are still issues.
Comment 8 Ciprian Ciubotariu 2012-12-03 17:19:58 UTC
Seems that having rc_need="net.eth5" in /etc/conf.d/netmount works just fine. However, the system does not update dependencies without manually running rc-update -u. Perhaps this still needs to be addressed.

Thanks for your support.