Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 234132 - NFS4: "/etc/init.d/rpc.idmapd" is not started during "/etc/init.d/nfs" start.
Summary: NFS4: "/etc/init.d/rpc.idmapd" is not started during "/etc/init.d/nfs" start.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-06 21:28 UTC by Roger
Modified: 2009-05-30 22:21 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 Roger 2008-08-06 21:28:55 UTC
NFS4: "/etc/init.d/rpc.idmapd" is not started during "/etc/init.d/nfs start".

Without rpc.idmapd being started within /etc/init.d/nfs, exported files all contain "nobody, nobody" respectively for "uid, gid".

"/etc/conf.d/nfs" does however contain the variables to pass to these optional rpc services.

Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/nfs start
2. ls -alh /nfs_exported_share_on_client
3. (lists folders/files with uid:gid nobody:nobody

Actual Results:  
rpc.idmapd is not started

Expected Results:  
rpc.idmapd should be started when nfs is started?
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-07 01:29:03 UTC
It should have been started automatically... Please post your `emerge --info' too.
Comment 2 Roger 2008-08-07 23:49:20 UTC
What info are you looking for exactly within emerge --info?

nfs is in useflags, but from what I know, /etc/init.d/nfs provides the required scripting.
Comment 3 Roger 2008-08-07 23:52:07 UTC
Since I'm using nfs4, this is probably more likely what your really want to know.

$ eix -scI rpc
[I] dev-perl/Event-RPC (0.90  @07/19/08): Event based transparent Client/Server RPC framework
[I] dev-perl/PlRPC (0.2020-r1  @08/05/08): The Perl RPC Module
[I] net-libs/librpcsecgss (0.16  @08/06/08): implementation of rpcsec_gss (RFC 2203) for secure rpc communication
[I] net-libs/rpc2 (2.0(1)  @08/06/08): Remote procedure call package for IP/UDP (used by Coda)

$ eix -scI nfs
[I] net-fs/nfs-utils (1.1.2-r1  @08/06/08): NFS client and server daemons
[I] net-libs/libnfsidmap (0.20  @08/07/08): NFSv4 ID <-> name mapping library
Comment 4 SpanKY gentoo-dev 2008-08-16 05:20:55 UTC
if you want nfs, you have to add rpc.idmapd yourself.  rpc.idmapd is not a requirement for NFSv2/NFSv3, thus it is not a requirement for the nfs init script.
Comment 5 Roger 2008-08-16 08:00:12 UTC
Is there a way to grep /proc/filesystems, or use /usr/sbin/nfsstat for signaling the server is using nfs4 v4.  If so, start rpc.idmapd.  

(This would probably be added into /etc/init.d/nfs script.)


Comment 6 SpanKY gentoo-dev 2008-08-20 15:23:15 UTC
no ... it is not possible to devine user intention from feature availability
Comment 7 ml 2009-04-08 16:13:12 UTC
(In reply to comment #6)
> no ... it is not possible to devine user intention from feature availability
> 

Yes it is! ;)

You could either spend some kind of variable in /etc/conf.d/nfs to enable NFS2/3/4 or add an extra "nfs4" init-script. I really don't need all the NFS2/3 stuff started and wasting time by adapting the firewall. I spent half of today on googling and searching for how to configure the user mapping until I realized there is a "use" dependency in /etc/init.d/nfs but no "need" dependency.

Print at least some ewarn that rpc.idmapd has to be added manually for NFS4 in the nfs-utils ebuild, please!
Comment 8 Roger 2009-04-08 19:30:37 UTC
I second this.

I did exactly as you did ml after opening this bug.  (Not only this, a year prior when I first started using NFS4, I couldn't find any answer for this bug, so user:groups never mapped.)

At least some warning should be printed by /etc/init.d/nfsd that /etc/init.d/rpc.idmapd (?) should be started manually if you are using NFS4 and want user:group mapping!

If nobody is going to fix this bug within the init scripts, at least print a d*mn warning.  I'd do the same if it were my scripts & programming... then again, my programming is littered with warnings & debug info.

(Reopening bug as above ml poster insists.  I feel it's kicking a dead horse. ;-)
Comment 10 Roger 2009-05-30 22:21:49 UTC
Thanks a million for this.  (It's a bug that had me stumped for years before finding the solution!  ... wasn't the only one either.)