From c94303d147dbadbdb4037619e91eabd8fb5377a7 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Dec 14 2014 17:01:57 +0000 Subject: Restored lockd port and v4 grace/lease interface (bz 1115225) Signed-off-by: Steve Dickson --- diff --git a/nfs-utils.spec b/nfs-utils.spec index 36bf6e0..cb1bdbd 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -292,6 +292,7 @@ fi * Sat Dec 13 2014 Steve Dickson 1.3.1-4.0 - Updated to latest upstream RC release: nfs-utils-1-3-2-rc4 (bz 1164477) - Handle the rpcuser like other created users (bz 1165322) +- Restored lockd port and v4 grace/lease interface (bz 1115225) * Wed Dec 3 2014 Steve Dickson 1.3.1-2.4 - Fixed typos in nfs-utils sysconfig files (bz 1170354) diff --git a/nfs-utils_env.sh b/nfs-utils_env.sh index 1863c34..8f4dd10 100644 --- a/nfs-utils_env.sh +++ b/nfs-utils_env.sh @@ -9,6 +9,23 @@ if test -r $nfs_config; then . $nfs_config fi +[ -n "$LOCKDARG" ] && /sbin/modprobe lockd $LOCKDARG +if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then + [ -z "$LOCKDARG" ] && /sbin/modprobe lockd $LOCKDARG + [ -n "$LOCKD_TCPPORT" ] && \ + /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1 + [ -n "$LOCKD_UDPPORT" ] && \ + /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1 +fi + +if [ "$NFSD_V4_GRACE" -gt 0 ]; then + grace="-G $NFSD_V4_GRACE" +fi + +if [ "$NFSD_V4_LEASE" -gt 0 ]; then + lease="-L $NFSD_V4_LEASE" +fi + if [ "$RPCNFSDCOUNT" -gt 0 ]; then nfsds=$RPCNFSDCOUNT else @@ -16,9 +33,9 @@ else fi if [ -n "$RPCNFSDARGS" ]; then - nfsdargs="$RPCNFSDARGS $nfsds" + nfsdargs="$RPCNFSDARGS $grace $lease $nfsds " else - nfsdargs="$nfsds" + nfsdargs="$grace $lease $nfsds " fi mkdir -p /run/sysconfig diff --git a/nfs.sysconfig b/nfs.sysconfig index 34a1e06..e357137 100644 --- a/nfs.sysconfig +++ b/nfs.sysconfig @@ -1,7 +1,14 @@ # -# NOTE: the LOCKD_TCPPORT and LOCKD_UDPPORT parameters in this file are -# now deprecated. Those that need lockd to listen on a particular -# set of ports should configure /etc/modprobe.d/lockd.conf to do so. +# Note: For new values to take effect the nfs-config service +# has to be restarted with the following command: +# systemctl restart nfs-config +# +# Optional arguments passed to in-kernel lockd +#LOCKDARG= +# TCP port rpc.lockd should listen on. +#LOCKD_TCPPORT=32803 +# UDP port rpc.lockd should listen on. +#LOCKD_UDPPORT=32769 # # Optinal options passed to rquotad RPCRQUOTADOPTS="" @@ -10,7 +17,13 @@ RPCRQUOTADOPTS="" RPCNFSDARGS="" # Number of nfs server processes to be started. # The default is 8. -RPCNFSDCOUNT=8 +# RPCNFSDCOUNT=16 +# +# Set V4 grace period in seconds +#NFSD_V4_GRACE=90 +# +# Set V4 lease period in seconds +#NFSD_V4_LEASE=90 # # Optional arguments passed to rpc.mountd. See rpc.mountd(8) RPCMOUNTDOPTS=""