Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 162133 - LOCKD_TCPPORT & LOCKD_UDPPORT don't work as expected
Summary: LOCKD_TCPPORT & LOCKD_UDPPORT don't work as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: nfs-utils
Version: 4.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Steve Dickson
QA Contact: Ben Levenson
URL:
Whiteboard: fi
Depends On:
Blocks: 181409
TreeView+ depends on / blocked
 
Reported: 2005-06-30 09:14 UTC by Ian Laurie
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2006-0463
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-10 21:28:20 UTC


Attachments (Terms of Use)
Proposed patch (deleted)
2006-02-15 13:03 UTC, Steve Dickson
no flags Details | Diff
rhel4-lockd-portset (deleted)
2006-02-15 17:28 UTC, Adam Stokes
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0463 normal SHIPPED_LIVE nfs-utils bug fix update 2006-08-09 04:00:00 UTC

Description Ian Laurie 2005-06-30 09:14:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050512 Red Hat/1.7.8-1.4.1

Description of problem:
Using LOCKD_TCPPORT & LOCKD_UDPPORT in /etc/sysconfig/nfs doesn't
work as expected.

File is:
STATD_PORT=4000
LOCKD_TCPPORT=4001
LOCKD_UDPPORT=4001
MOUNTD_PORT=4002
RQUOTAD_PORT=4003

When you issue "rpcinfo -p" you get:

    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100021    1   udp  32770  nlockmgr
    100021    3   udp  32770  nlockmgr
    100021    4   udp  32770  nlockmgr
    100021    1   tcp  32769  nlockmgr
    100021    3   tcp  32769  nlockmgr
    100021    4   tcp  32769  nlockmgr
    100011    1   udp   4003  rquotad
    100011    2   udp   4003  rquotad
    100011    1   tcp   4003  rquotad
    100011    2   tcp   4003  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100005    1   udp   4002  mountd
    100005    1   tcp   4002  mountd
    100005    2   udp   4002  mountd
    100005    2   tcp   4002  mountd
    100005    3   udp   4002  mountd
    100005    3   tcp   4002  mountd
    100024    1   udp   4000  status
    100024    1   tcp   4000  status

All the ports look OK except for nlockmgr.


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

How reproducible:
Always

Steps to Reproduce:
1. Set /etc/sysconfig/nfs as shown above.
2. Restart system
3. Issue "rpcinfo -p"
  

Actual Results:  nlockmgr is shown using the wrong ports.

Expected Results:  nlockmgr should be shown using port 4001.

Additional info:

Using the commands:

  /sbin/sysctl fs.nfs.nlm_tcpport
  /sbin/sysctl fs.nfs.nlm_udpport

Results in:

  fs.nfs.nlm_tcpport = 4001
  fs.nfs.nlm_udpport = 4001

Yet "rpcinfo -p" shows the wrong ports.

Comment 1 Steve Dickson 2006-02-03 14:56:27 UTC
Well just because you ask for those ports, there is no
guarantee the services will be able to bind to those exact
ports since there might already taken by another process.
Meaning there is no way to reserver those ports prior to
actually bind to them.....

I thought about failing the server if the requested port
was not available, but I figured that may not be such a 
good idea... 

BTW, what nfs-utils version are you using (i.e. what
does 'rpm -q nfs-utils' say)

Comment 5 Steve Dickson 2006-02-15 13:03:56 UTC
Created attachment 124674 [details]
Proposed patch

I believe I found the problem. The reason the lockd ports are not
being set is because the nfslock initscript is not setting them... So here
is a patch that should take care of the problem. Please let me know
one way or the other...

Comment 6 Adam Stokes 2006-02-15 17:28:05 UTC
Created attachment 124696 [details]
rhel4-lockd-portset

Comment 9 Ian Laurie 2006-04-09 07:59:52 UTC
I have applied the patch in comment #5 to /etc/rc.d/nfslock and it works.

Previously I got around the problem by doing it the old way with the line:

  options lockd nlm_udpport=4001 nlm_tcpport=4001 

added to the modprobe.conf file.

I notice that the nfslock file in FC5 probably needs this patch also.

Comment 10 Ian Laurie 2006-04-17 01:48:53 UTC
I can confirm that the RHEL4 patch in comment #5 fixes FC5 also.

I have created a bug report against FC5, bug 189101



Comment 11 Steve Dickson 2006-05-02 16:57:05 UTC
fixed in nfs-utils-1.0.6-69

Comment 15 Red Hat Bugzilla 2006-08-10 21:28:28 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0463.html



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