Bug 112598 - /etc/init.d/nfs does not respect LOCKD_TCPPORT & LOCKD_UDPPORT
Summary: /etc/init.d/nfs does not respect LOCKD_TCPPORT & LOCKD_UDPPORT
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils   
(Show other bugs)
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-24 04:19 UTC by Kevin Street
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: nfs-utils-1.0.6-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-27 22:34:21 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch for /etc/init.d/nfs (1.09 KB, patch)
2003-12-24 04:41 UTC, Kevin Street
no flags Details | Diff
Fix that starts and stops nfsd once if necessary to create the needed parameter keys (438 bytes, patch)
2004-05-27 14:09 UTC, Heiko Ettelbrück
no flags Details | Diff

Description Kevin Street 2003-12-24 04:19:35 UTC
Description of problem:
setting LOCKD_TCPPORT & LOCKD_UDPPORT in /etc/sysconfig/nfs have no
effect on reboot (but work with service nfs restart)

Version-Release number of selected component (if applicable):
nfs-utils-1.0.6-1

How reproducible:
always on boot
(run rpcinfo -p to confirm that nlockmgr is using random ports)

Steps to Reproduce:
1.as above
2.
3.
  
Actual results:
nlockmgr uses random high ports after boot but uses the correct ports
after service nfs restart

Expected results:
nlockmgr uses the ports specified in /etc/sysconfig/nfs

Additional info:

Comment 1 Kevin Street 2003-12-24 04:41:36 UTC
Created attachment 96688 [details]
patch for /etc/init.d/nfs

two fixes:
- the main problem is that the sysctl -w fs.nfs.nlm_tcpport (& udpport) fails
with "unknown key" when booting.  Moving the call to exportfs before the sysctl
fixes this.  It works ok with service nfs restart.

- the tests like [ -n "LOCKD_TCPPORT ] should be [ -n "$LOCKD_TCPPORT ] but I
believe these are harmless here.

Comment 2 Heiko Ettelbrück 2004-05-27 14:09:36 UTC
Created attachment 100631 [details]
Fix that starts and stops nfsd once if necessary to create the needed parameter keys

With Fedora Core 2 I see the same behaviour (LOCKD_TCPPORT and LOCKD_UDPPORT
have no effect) although Kevin's fix has been integrated into /etc/init.d/nfs.
Even though exportfs is called before trying to set those values via sysctl,
the two calls fail with the well-known message about using an "unknown key", as
Kevin got.

Playing around, it seems that the keys fs.nfs.* are available when the kernel
nfsd has been started at least once, which is done some lines after trying to
set the values in the init script.

--> Fix (that works at least for me):
Start and stop the kernel nfsd once before setting the TCP and UDP ports in
/etc/init.d/nfs (see attached diff).


Note You need to log in before you can comment on or make changes to this bug.