Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 261697 - net-fs/nfs-utils-1.1.4-r1: rpc.idmapd doesn't start when DNOTIFY is disabled
Summary: net-fs/nfs-utils-1.1.4-r1: rpc.idmapd doesn't start when DNOTIFY is disabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-08 14:15 UTC by Pacho Ramos
Modified: 2009-03-17 20:26 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 Pacho Ramos gentoo-dev 2009-03-08 14:15:55 UTC
I am trying to use nfs4 instead of nfs, but nfsmount cannot start as rpc.idmapd no longer works, I get this in /var/log/messages:
Mar  8 15:13:36 belkin2 rpc.idmapd[12140]: main: fcntl(/var/lib/nfs/rpc_pipefs//nfs): Invalid argument
Mar  8 15:13:36 belkin2 rc-scripts: ERROR:  cannot start nfsmount as rpc.idmapd could not start

The line in fstab is:
belkin3:/usr/distfiles  /usr/distfiles  nfs4            defaults,user                           0       0

My emerge --info:
Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.28-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r2-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-glibc2.2.5
Timestamp of tree: Thu, 05 Mar 2009 18:35:01 +0000
distcc 3.0 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -msse3"
DISTDIR="/usr/distfiles"
FEATURES="autoaddcvs ccache collision-protect cvs distlocks fixpackages multilib-strict parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="es es_ES en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/zen-overlay /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 amr asf audiofile avahi bash-completion beagle berkdb bzip2 bzlib cairo caps cdb cdda cddb cdinstall cdparanoia cdr cli consolekit cpdflib cracklib cross crypt css cups curl daap dbus dga dirac divx4linux djvu dlloader dri dts dv dvb dvd dvdr dvdread dvi eds emboss encode epiphany erandom escreen evo evolution exif fam fame fbcon ffmpeg flac foomaticdb fortran ftp fuse galago gb gcj gd ggi gif gimp gimpprint git glib glitz glut glx gnome gnome-keyring gnome-print gphoto2 gpm gsm gstreamer gtk gtk2 hal iconv idn imagemagick imlib inotify isdnlog ithreads jabber java java6 jfs jpeg jpeg2k kdeenablefinal kdehiddenvisibility kpathsea lame latex lcms libnotify lm_sensors logrotate lzma mad madwifi midi mikmod mime mjpeg mmx mmxext mng mono moonlight motif mp3 mpeg mpi mplayer mudflap multilib musepack musicbrainz nas nautilus ncurses nethack network networkmanager nls nocardbus nptl nptlonly ntp nvidia ogg oggvorbis openal opengl openmp pam pango pch pcre pdf perl plotutils png posix postscript ppds pppd python qt3 qt3support qt4 quicktime readline reflection remote rtc scanner schroedinger scrobbler sdl session slang slp sockets speex spell spl sse sse2 sse3 ssl ssse3 startup-notification subversion svg sysfs sysvipc t1lib tcpd theora threads thunderbird tiff timidity totem trayicon truetype unicode usb v4l2 vcd videos vim vorbis wma wmf x264 xattr xcb xcomposite xfs xft xine xml xml2 xorg xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Reproducible: Always
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-08 17:17:12 UTC
Reassigning to net-fs herd.
Comment 2 SpanKY gentoo-dev 2009-03-08 18:58:52 UTC
you need to describe the package you're actually using: what version of nfs-utils do you have installed ?

rpc.idmapd should make rpc.pipefs run and the later will mount the right dir on /var/lib/nfs/rcp_pipefs/
Comment 3 Pacho Ramos gentoo-dev 2009-03-08 19:13:08 UTC
It's 1.1.4-r1 

But behavior is really strange:
1. I editted my fstab for mounting it as nfs4, then, /etc/init.d/nfsmount restart started to fail due rpc.idmapd not being able to be started. 
2. Then, I editted fstab agaibn for getting it back to nfs instead of nfs4 but, even with that, /etc/init/nfsmount restart still failled with the same (even after a reboot).
3. I looked to nfsmount init.d file and added two "echo" at end of each:
                [ ${ret} -eq 10 ] && myneed="${myneed} rpc.gssd"
                [ ${ret} -eq 20 ] && myneed="${myneed} rpc.idmapd"
line for trying to see why rpc.idmapd was being still required to be started (even when I was using old "nfs" again)
4. Just after adding these "echo"s, /etc/init.d/nfsmount restart worked again (?!), as rpc.idmapd is no required again. And even re-editting fstab for using nfs4 again, rpc.idmapd is no longer required to start nfsmount (even when it still fails when manually started and mount.nfs4 fails with a different error)
Comment 4 SpanKY gentoo-dev 2009-03-08 20:28:38 UTC
forget about that for now

if you start rpc.idmapd manually, does it work ?
/etc/init.d/rpc.idmapd start
Comment 5 Pacho Ramos gentoo-dev 2009-03-08 20:35:56 UTC
No, I get the same:
Mar  8 21:35:35 belkin2 rpc.idmapd[19063]: main: fcntl(/var/lib/nfs/rpc_pipefs//nfs): Invalid argument
Comment 6 SpanKY gentoo-dev 2009-03-08 23:19:54 UTC
is rpc.pipefs started ?  what does `mount` show ?
Comment 7 Pacho Ramos gentoo-dev 2009-03-09 09:10:26 UTC
(In reply to comment #6)
> is rpc.pipefs started ?  what does `mount` show ?
> 

Seems that not as I get:
 * Starting idmapd ...                                                    [ !! ]

mount output:
# mount
/dev/sda1 on / type reiserfs (rw,noatime,user_xattr,notail)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,gid=5,mode=620)
/dev/sda5 on /home type reiserfs (rw,noatime,user_xattr,notail)
/dev/sda6 on /usr/portage type ext2 (rw,noatime)
/dev/sda3 on /mnt/windows type fuseblk (rw,allow_other,blksize=4096)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
tmpfs on /var/tmp/portage type tmpfs (rw)
gvfs-fuse-daemon on /home/pacho/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=pacho)

----

I am now with net-fs/nfs-utils-1.1.5 and I have the same problem

Thanks :-)
Comment 8 SpanKY gentoo-dev 2009-03-09 21:03:20 UTC
so look in /var/lib/nfs/rpc_pipefs/ to see what all is in there

did you enable all the proper nfs4 options in your kernel ?
Comment 9 Pacho Ramos gentoo-dev 2009-03-10 07:48:36 UTC
Seems that only empty subdirs are being created:
# ls -lR /var/lib/nfs/rpc_pipefs/
/var/lib/nfs/rpc_pipefs/:
total 0
dr-xr-xr-x 2 root root 0 mar 10 08:47 lockd
dr-xr-xr-x 2 root root 0 mar 10 08:47 mount
dr-xr-xr-x 2 root root 0 mar 10 08:47 nfs
dr-xr-xr-x 2 root root 0 mar 10 08:47 portmap
dr-xr-xr-x 2 root root 0 mar 10 08:47 statd

/var/lib/nfs/rpc_pipefs/lockd:
total 0

/var/lib/nfs/rpc_pipefs/mount:
total 0

/var/lib/nfs/rpc_pipefs/nfs:
total 0

/var/lib/nfs/rpc_pipefs/portmap:
total 0

/var/lib/nfs/rpc_pipefs/statd:
total 0

About kernel config, I have:
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
# CONFIG_NFSD is not set
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_COMMON=y

I can attach full config if you want. 

Best regards
Comment 10 SpanKY gentoo-dev 2009-03-10 09:08:43 UTC
do you have DNOTIFY turned off ?  try enabling that in your kernel if you dont
Comment 11 Pacho Ramos gentoo-dev 2009-03-10 09:40:29 UTC
(In reply to comment #10)
> do you have DNOTIFY turned off ?  try enabling that in your kernel if you dont
> 

After turning it on it rpc-idmapd starts:
Mar 10 10:39:00 belkin2 rpc.idmapd[8491]: nss_getpwnam: name '0' does not map into domain 'local.domain.edu'

Well, I still cannot mount nfs4 shared due:
 * Mounting NFS filesystems ...
mount.nfs4: mounting belkin3:/usr/distfiles failed, reason given by server:
  No such file or directory                                                                                                                            [ !! ]

but it seems a different problem

Thanks a lot for your attention :-)
Comment 12 SpanKY gentoo-dev 2009-03-10 10:10:28 UTC
hmm, how best to solve it ...

if the message that was logged was updated, would that be enough you think ?

Mar  8 15:13:36 belkin2 rpc.idmapd[12140]: main: fcntl(/var/lib/nfs/rpc_pipefs//nfs): Invalid argument (DNOTIFY enabled in kernel?)
Comment 13 Pacho Ramos gentoo-dev 2009-03-10 10:25:32 UTC
It would be nice from upstream point of view but, anyway, I think that, if you don't want to inherit linux-info.eclass for using CONFIG_CHECK, maybe adding an elog line with this info would be better.

I say this because for seeing "fcntl(/var/lib/nfs/rpc_pipefs//nfs): Invalid argument" I need to manually check /var/log/messages (or check tty12 in my case as I have syslog-ng configured for showing messages on it), because this error is not being shown when simply typing "/etc/init.d/rpc.idmapd start" (at least with current stable baselayout, I don't know if this is shown when using openrc...)

I know that, usually, users that will send bug reports will check /var/log/messages first, but maybe some users would still post this problem in forums without checking messages file. This could be prevented if ebuild would stop if DNOTIFY is not in config file or with a elog message (if nonfsv4 USE flag is not set)
Comment 14 SpanKY gentoo-dev 2009-03-14 18:42:38 UTC
failures for runtime kernel features are not ok to check in ebuilds.  packages can be cross-compiled, built up for binary-only, etc...  so checking the kernel is not ok.

if the warning was in the init.d, it might be better:
# /etc/init.d/rpc.idmapd start
* Starting idmapd...
* make sure DNOTIFY support is enabled ...                        [ !! ]
* ERROR: rpc.idmapd failed to start
http://sources.gentoo.org/net-fs/nfs-utils/files/rpc.idmapd.initd?r1=1.7&r2=1.8

as for the source code, it seems upstream has done this already:
        if (fcntl(fd, F_NOTIFY,
            DN_CREATE | DN_DELETE | DN_MODIFY | DN_MULTISHOT) == -1) {
            xlog_err("main: fcntl(%s): %s", pipefsdir, strerror(errno));
            if (errno == EINVAL)
                xlog_err("main: Possibly no Dnotify support in kernel.");
        }
Comment 15 Pacho Ramos gentoo-dev 2009-03-17 20:26:03 UTC
OK, it's fine :-)

Thanks a lot for your attention and the explanation about why I was wrong suggesting checking this in ebuild

Regards!