SCIENTIFIC-LINUX-USERS Archives

September 2008

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jon Peatfield <[log in to unmask]>
Reply To:
Jon Peatfield <[log in to unmask]>
Date:
Tue, 23 Sep 2008 04:18:18 +0100
Content-Type:
multipart/mixed
Parts/Attachments:
TEXT/PLAIN (1697 bytes) , nfslock.patch (496 bytes)
Looking more closely the problem seems to affect the sl52 boxes I can look 
at but not sl50 or sl51 systems (as far as I can tell anyway).

A quick peek at the startup scripts shows nothing obviously different but 
adding a trivial patch to /etc/rc.d/init.d/nfslock makes it work as 
expected on at least one sl52 box (see attached patch).

Without the patch the lockd kernel module may nto be loaded at the point 
that we attempt the sysctl and so it silently fails, when something else 
pulls in lockd (nfs for example) those values are left at the default so 
it picks a random port.

I was debugging it by adding:

   /usr/sbin/rpcinfo -p
   /sbin/sysctl fs.nfs.nlm_tcpport fs.nfs.nlm_udpport

at various points and noticed that the sysctl was failing with:

+ /sbin/sysctl fs.nfs.nlm_tcpport fs.nfs.nlm_udpport
error: "fs.nfs.nlm_tcpport" is an unknown key
error: "fs.nfs.nlm_udpport" is an unknown key

and that was just after the sysctl -w calls...

[ So it seems we need to do the sysctl AFTER lockd is loaded but BEFORE 
anything tries to use it ]

Now I don't really understand why this wasn't needed in sl50/sl51, they 
seem to have the identical startup scripts in this area though sysctl 
program itself has indeed changed.

-- 
/--------------------------------------------------------------------\
| "Computers are different from telephones.  Computers do not ring." |
|       -- A. Tanenbaum, "Computer Networks", p. 32                  |
---------------------------------------------------------------------|
| Jon Peatfield, _Computer_ Officer, DAMTP,  University of Cambridge |
| Mail:  [log in to unmask]     Web:  http://www.damtp.cam.ac.uk/ |
\--------------------------------------------------------------------/



--- nfslock.sl_orig 2008-09-23 04:07:35.000000000 +0100 +++ nfslock 2008-09-23 04:09:01.000000000 +0100 @@ -58,6 +58,11 @@ # See if the kernel lockd should start up # listening on a particular port # + + ## force load of lockd now so we can use sysctl to set + ## the fs.nfs.nlm* values below + /sbin/modprobe lockd + [ -n "$LOCKD_TCPPORT" ] && \ /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1 [ -n "$LOCKD_UDPPORT" ] && \

ATOM RSS1 RSS2