Bug 219566 - net-fs/nfs-utils-1.1.2: rpc.idmapd init script doesn't load sunrpc.ko required for rpc_pipefs
Bug#: 219566 Product:  Gentoo Linux Version: 2007.0 Platform: All
OS/Version: Linux Status: RESOLVED Severity: minor Priority: P2
Resolution: FIXED Assigned To: net-fs@gentoo.org Reported By: Martin.vGagern@gmx.net
Component: Unspecified
URL: 
Summary: net-fs/nfs-utils-1.1.2: rpc.idmapd init script doesn't load sunrpc.ko required for rpc_pipefs
Keywords:  
Status Whiteboard: 
Opened: 2008-04-28 04:00 0000
Description:   Opened: 2008-04-28 04:00 0000
After building nfs4 support as kernel modules, the rpc.idmapd init script
reported an error during startup. The log contained these lines:

[rpc.idmapd] main: open(/var/lib/nfs/rpc_pipefs/nfs): No such file or directory
[/etc/init.d/rpc.idmapd] ERROR: rpc.idmapd failed to start

Looking at the init script, I found that it would mount rpc_pipefs if that file
system was known to the kernel, but try without it being mounted if the
filesystem was unknown. Grepping all modules which are loaded when other nfs
services are up, I found that sunrpc contains the string "rpc_pipefs".

Workaround: Force loading of this module at boot time:
echo 'modules="${modules} sunrpc"' >> /etc/conf.d/modules

Solution: Have the init script of rpc.idmapd automatically modprobe sunrpc,
either directly or via some dependency. Perhaps also print a warning message if
rpc_pipefs could not be mounted.

------- Comment #1 From Stéphane Pagnon 2008-04-28 11:05:12 0000 -------
looks at that. try. still bug ?
http://bugs.gentoo.org/show_bug.cgi?id=101624#c16
http://bugs.gentoo.org/show_bug.cgi?id=172133#c9

it happens on a client computer (one that have never start nfs server but that
want to mount an nfs)

------- Comment #2 From Martin von Gagern 2008-04-28 13:49:31 0000 -------
(In reply to comment #1)
> looks at that. try. still bug ?
> http://bugs.gentoo.org/show_bug.cgi?id=101624#c16
> http://bugs.gentoo.org/show_bug.cgi?id=172133#c9

These are different issues, as they deal with the presence of the rpc_pipefs
mountpoint, and corresponding parts are already present in the init scripts
from my nfs-utils-1.1.2. So there is nothing more for me to try there.

------- Comment #3 From SpanKY 2008-05-04 09:51:56 0000 -------
if rpc_pipefs is not available, then we try to load it silently

http://sources.gentoo.org/net-fs/nfs-utils/files/rpc.gssd.initd?r1=1.8&r2=1.9
http://sources.gentoo.org/net-fs/nfs-utils/files/rpc.idmapd.initd?r1=1.5&r2=1.6
http://sources.gentoo.org/net-fs/nfs-utils/files/rpc.svcgssd.initd?r1=1.2&r2=1.3

------- Comment #4 From Martin von Gagern 2008-05-04 13:09:13 0000 -------
(In reply to comment #3)

If there are three init scripts, all containing the same code to mount pipefs,
which is always executed unconditionally, you might consider providing a
separate init script just to mount pipefs, and have the other iscripts depend
on that. Would be cleaner in my opinion.

Anyway, thanks for the fix!