[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#758974: nfs-common: mount.nfs (stable) does not continue trying addresses when server returns EACCES



Package: nfs-common
Version: 1:1.2.6-4
Severity: wishlist

The version of mount.nfs in stable does not continue trying addresses
when it receives an EACCES from the server.  This has been causing
problems when mounting exports from RHEL5 machines, which do not
support NFS over IPv6, and have ip6tables configured to --reject-with
icmp6-adm-prohibited, which causes the kernel to return EACCES.
Because IPv6 is tried first, this causes the mount to fail, whereas it
would work if mount continued on to try IPv4 after.

It is possible to work around the issue in the case I mentioned by
forcing the mount to be IPv4.

This problem is fixed in the following upstream commit:
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=7600e19437e34585af1651bb73c6ae9d2951ede8
and was included in release 1.2.8 of nfs-utils, so testing and
unstable should already have it.  However I'd like to ask if it would
be possible to include a fix in stable for the benefit of others who
may be running in similar heterogeneous production environments.

The following patch (or similar) works for me:

==cut==
diff -ru nfs-utils-1.2.6-old/utils/mount/stropts.c nfs-utils-1.2.6/utils/mount/stropts.c
--- nfs-utils-1.2.6-old/utils/mount/stropts.c	2014-08-22 17:17:36.821904452 +0100
+++ nfs-utils-1.2.6/utils/mount/stropts.c	2014-08-22 17:18:24.282637567 +0100
@@ -663,6 +663,7 @@
 
 		switch (errno) {
 		case ECONNREFUSED:
+		case EACCES:
 		case EOPNOTSUPP:
 		case EHOSTUNREACH:
 			continue;
@@ -751,6 +752,7 @@
 
 		switch (errno) {
 		case ECONNREFUSED:
+		case EACCES:
 		case EHOSTUNREACH:
 			continue;
 		default:
==cut==

Thanks,
Jonathan


-- Package-specific info:
-- rpcinfo --
   program vers proto   port
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  39735  status
    100024    1   tcp  52125  status
-- /etc/default/nfs-common --
NEED_STATD=
STATDOPTS=
NEED_IDMAPD=
NEED_GSSD=
-- /etc/idmapd.conf --
[General]
Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
-- /proc/mounts --
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0

-- System Information:
Debian Release: 7.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nfs-common depends on:
ii  adduser             3.113+nmu3
ii  initscripts         2.88dsf-41+deb7u1
ii  libc6               2.13-38+deb7u3
ii  libcap2             1:2.22-1.2
ii  libcomerr2          1.42.5-1.1
ii  libdevmapper1.02.1  2:1.02.74-8
ii  libevent-2.0-5      2.0.19-stable-3
ii  libgssglue1         0.4-2
ii  libk5crypto3        1.10.1+dfsg-5+deb7u2
ii  libkeyutils1        1.5.5-3
ii  libkrb5-3           1.10.1+dfsg-5+deb7u2
ii  libmount1           2.20.1-5.3
ii  libnfsidmap2        0.25-4
ii  libtirpc1           0.2.2-5
ii  libwrap0            7.6.q-24
ii  lsb-base            4.1+Debian8+deb7u1
ii  rpcbind             0.2.0-8
ii  ucf                 3.0025+nmu3

Versions of packages nfs-common recommends:
ii  python  2.7.3-4+deb7u1

Versions of packages nfs-common suggests:
pn  open-iscsi  <none>
pn  watchdog    <none>

Versions of packages nfs-kernel-server depends on:
ii  libblkid1  2.20.1-5.3
ii  libc6      2.13-38+deb7u3
ii  libtirpc1  0.2.2-5
ii  libwrap0   7.6.q-24
ii  lsb-base   4.1+Debian8+deb7u1
ii  ucf        3.0025+nmu3

-- no debconf information


Reply to: