Bug 1413272
| Summary: | nlockmgr no longer reading /etc/sysconfig/nfs file for LOCKD_TCPPORT and LOCKD_UDPPORT values | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Madhur Gupta <madgupta> | |
| Component: | nfs-utils | Assignee: | Steve Dickson <steved> | |
| Status: | CLOSED ERRATA | QA Contact: | Yongcheng Yang <yoyang> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 7.3 | CC: | jiyin, psingare, rkothiya, steved, xzhou, yoyang, zlang | |
| Target Milestone: | rc | Keywords: | Patch | |
| Target Release: | --- | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | nfs-utils-1.3.0-0.57.el7 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1624666 (view as bug list) | Environment: | ||
| Last Closed: | 2018-10-30 11:48:04 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1420851 | |||
As Bug 1264387 Comment #11 mentioned, we have changed to use lockd.conf instead of sysconfig to set module lockd parameters since nfs-utils-1.3.0-0.28.el7 Thank you! Yongcheng. So as this is an expected behavior shall we close this ticket as not a bug ? Sorry, I got little confused here, it is expected to read values from module lockd parameter or frp, lockd.conf file here ? (In reply to Madhur Gupta from comment #3) > Thank you! Yongcheng. > > So as this is an expected behavior shall we close this ticket as not a bug ? IMHO, just closing this one as duplicate to bug 1264387 is enough. (In reply to Madhur Gupta from comment #4) > Sorry, I got little confused here, it is expected to read values from module > lockd parameter or frp, lockd.conf file here ? I only use the config file "lockd.conf" ("/etc/sysconfig/nfs" previously) to specify the lockd parameters. Sorry that I don't know if there is any other method. ------------------------------------------------------------------ [root ~]# grep '.*' -r /sys/module/lockd/parameters/ /sys/module/lockd/parameters/nlm_grace_period:0 /sys/module/lockd/parameters/nlm_tcpport:0 /sys/module/lockd/parameters/nlm_max_connections:1024 /sys/module/lockd/parameters/nlm_timeout:10 /sys/module/lockd/parameters/nsm_use_hostnames:N /sys/module/lockd/parameters/nlm_udpport:0 [root ~]# cat /etc/modprobe.d/lockd.conf # # Set the NFS lock manager grace period. n is measured in seconds. #options lockd nlm_grace_period=90 # # Set the TCP port that the NFS lock manager should use. # port must be a valid TCP port value (1-65535). #options lockd nlm_tcpport <<<<<<<<<<<<<<<<<<<<<<<<<< # # Set the UDP port that the NFS lock manager should use. # port must be a valid UDP port value (1-65535). #options lockd nlm_udpport <<<<<<<<<<<<<<<<<<<<<<<<<< # # Set the maximum number of outstanding connections #options lockd nlm_max_connections=1024 # # Set the default time value for the NFS lock manager # in seconds. Default is 10 secs (min 3 max 20) #options lockd nlm_timeout=10 # # Choose whether to record the caller_name or IP address # this peer in the local rpc.statd's database. #options lockd nsm_use_hostnames=0 [root ~]# rpm -qf /etc/modprobe.d/lockd.conf nfs-utils-1.3.0-0.33.el7.x86_64 The "lockd" options in /etc/sysconfig/nfs have already been added back in nfs-utils-1.3.0-0.57.el7 Now we have 2 ways to set lockd module's option: - via /etc/sysconfig/nfs - via /etc/modprobe.d/lockd.conf From the results of some simple tests, looks like: - Which configuration taking effect depends on how to load the "lockd" module. I.e. * "modprobe lockd" reads config from "/etc/modprobe.d/lockd.conf" * "systemctl restart nfs-config" reads config "/etc/sysconfig/nfs" - After loaded, "LOCKD_TCPPORT" and "LOCKD_UDPPORT" can be modified by restarting nfs-config and reading "/etc/sysconfig/nfs" - After loaded, other value of "LOCKDARG" cannot be modified unless re-loading it. This re-expose the issue I reported in Bug 1264387, i.e., "LOCKDARG" of "/etc/sysconfig/nfs" doesn't take effect after restarting nfs-config.service. However, looks to me now it's probably not a problem. Please have a look at the testing logs: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root~]# rpm -q nfs-utils nfs-utils-1.3.0-0.57.el7.x86_64 [root~]# [root~]# cat /etc/modprobe.d/lockd.conf options lockd nlm_grace_period=90 options lockd nlm_tcpport=33333 options lockd nlm_udpport=33334 [root~]# [root~]# cat /etc/sysconfig/nfs LOCKDARG="nlm_grace_period=120" LOCKD_TCPPORT=55556 LOCKD_UDPPORT=55557 [root~]# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # load "lockd" by nfs-config.service, it's configured by # /etc/sysconfig/nfs and all values cannot be changed by # /etc/modprobe.d/lockd.conf ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root~]# rmmod lockd [root~]# systemctl restart nfs-config [root~]# sysctl fs.nfs | grep -E "grace|port" fs.nfs.nlm_grace_period = 120 fs.nfs.nlm_tcpport = 55556 fs.nfs.nlm_udpport = 55557 [root~]# modprobe lockd [root~]# sysctl fs.nfs | grep -E "grace|port" fs.nfs.nlm_grace_period = 120 fs.nfs.nlm_tcpport = 55556 fs.nfs.nlm_udpport = 55557 [root~]# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # load "lockd" by command "modprobe", it's configured by # /etc/modprobe.d/lockd.conf at first and nlm_{tcp,udp}port # can be updated by /etc/sysconfig/nfs when restarting nfs-config ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root~]# rmmod lockd [root~]# modprobe lockd [root~]# sysctl fs.nfs | grep -E "grace|port" fs.nfs.nlm_grace_period = 90 fs.nfs.nlm_tcpport = 33333 fs.nfs.nlm_udpport = 33334 [root~]# systemctl restart nfs-config [root~]# sysctl fs.nfs | grep -E "grace|port" fs.nfs.nlm_grace_period = 90 fs.nfs.nlm_tcpport = 55556 <<<<<<<<<<<<<<<<<<<< fs.nfs.nlm_udpport = 55557 <<<<<<<<<<<<<<<<<<<< [root~]# Moving to VERIFIED according to comment #18. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3311 |
Description of problem: nlockmgr no longer reading /etc/sysconfig/nfs file for LOCKD_TCPPORT and LOCKD_UDPPORT values, then have to define values in below values into /etc/modprobe.d/lockd.conf for workaround: # egrep 32[78] /etc/modprobe.d/lockd.conf options lockd nlm_tcpport=32803 options lockd nlm_udpport=32769 Version-Release number of selected component (if applicable): How reproducible: After upgrading nfs-utils to nfs-utils-1.3.0-0.33.el7.x86_64 and rebooting, nlockmgr no longer reading /etc/sysconfig/nfs file for LOCKD_TCPPORT and LOCKD_UDPPORT values. # rpcinfo -p | egrep 32[78] # # grep 32[78] /etc/sysconfig/nfs #LOCKD_TCPPORT=32803 #LOCKD_UDPPORT=32769 LOCKD_TCPPORT=32803 LOCKD_UDPPORT=32769 # # rpcinfo -p program vers proto port service 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 662 status 100024 1 tcp 662 status 100005 1 udp 892 mountd 100005 1 tcp 892 mountd 100005 2 udp 892 mountd 100005 2 tcp 892 mountd 100005 3 udp 892 mountd 100005 3 tcp 892 mountd 100003 3 tcp 2049 nfs 100003 4 tcp 2049 nfs 100227 3 tcp 2049 nfs_acl 100003 3 udp 2049 nfs 100003 4 udp 2049 nfs 100227 3 udp 2049 nfs_acl 100021 1 udp 46424 nlockmgr 100021 3 udp 46424 nlockmgr 100021 4 udp 46424 nlockmgr 100021 1 tcp 46091 nlockmgr 100021 3 tcp 46091 nlockmgr 100021 4 tcp 46091 nlockmgr Steps to Reproduce: 1. 2. 3. Actual results: # # cat /sys/module/lockd/parameters/nlm_tcpport 0 # # cat /sys/module/lockd/parameters/nlm_udpport 0 # Expected results: # # cat /sys/module/lockd/parameters/nlm_udpport 32769 # cat /sys/module/lockd/parameters/nlm_tcpport 32803 # Additional info: Current workaround is as follows. 1) Update newly added file /etc/modprobe.d/lockd.conf to nfs-utils as follows: # egrep 32[78] /etc/modprobe.d/lockd.conf options lockd nlm_tcpport=32803 options lockd nlm_udpport=32769 # 2) Stop following services # systemctl stop proc-fs-nfsd.mount rpcbind.socket # systemctl stop nfs-server rpcbind nfs-lock nfs-idmap nfs-config 3) Unload nfsd modules # modprobe -r nfsd # 4) Restart services stopped in step 2 # systemctl start nfs-server rpcbind nfs-lock nfs-idmap nfs-config # 5) Verify correct ports in use # rpcinfo -p | egrep 32[78] 100021 1 udp 32769 nlockmgr 100021 3 udp 32769 nlockmgr 100021 4 udp 32769 nlockmgr 100021 1 tcp 32803 nlockmgr 100021 3 tcp 32803 nlockmgr 100021 4 tcp 32803 nlockmgr # # cat /sys/module/lockd/parameters/nlm_udpport 32769 # cat /sys/module/lockd/parameters/nlm_tcpport 32803 #