Bug 1013468
Summary: | [rpc.mountd] -n|--no-tcp option cannot work with -N 4 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | JianHong Yin <jiyin> |
Component: | nfs-utils | Assignee: | Steve Dickson <steved> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | JianHong Yin <jiyin> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.0 | CC: | eguan, fs-qe, qcai, rwheeler, steved |
Target Milestone: | rc | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | nfs-utils-1.2.9-0.0.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 984824 | Environment: | |
Last Closed: | 2014-06-13 09:38:08 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: | 984824, 1127955, 1127957 | ||
Bug Blocks: | 859078, 1011909 |
Comment 1
JianHong Yin
2013-09-30 07:22:10 UTC
[root@dhcp-13-136 ~]# rpc.mountd -n -N 4 [root@dhcp-13-136 ~]# rpcinfo -s program version(s) netid(s) service owner 100000 2,3,4 local,udp,tcp,udp6,tcp6 portmapper superuser 100024 1 tcp6,udp6,tcp,udp status 29 100005 3,2,1 tcp6,udp6,tcp,udp mountd superuser [root@dhcp-13-136 ~]# ps axf | grep rpc.mountd 14057 pts/2 S+ 0:00 \_ grep --color=auto rpc.mountd 14054 ? Ss 0:00 rpc.mountd -n -N 4 even with -N 4 rpc.mountd still can not turn off tcp port; I have take a look at as to why -n no longer works. It happen when nfs-utils switched from the glibc RPC code to the libtirpc RPC code, a few years back... I personally believe, not being able to turn off TCP mount is a good thing! I think the bug should be you can't turn of UDP mounts because that's what we really want... With that said... there actually is ways to turn of both UDP and TCP mount. Simply comment out the "udp tpi_clts v inet udp" "tcp tpi_cots_ord v inet tcp" lines in the /etc/netconfig, at least in theory... So, I'm going to close this bug as WONTFIX and work with upstream to eliminate this flag completely... (In reply to Steve Dickson from comment #5) > I have take a look at as to why -n no longer works. It happen when nfs-utils > switched from the glibc RPC code to the libtirpc RPC code, a few years > back... > > I personally believe, not being able to turn off TCP mount is a good thing! > I > think the bug should be you can't turn of UDP mounts because that's > what we really want... So strange reason... Fix this problem is difficult to do? > > With that said... there actually is ways to turn of both UDP and TCP mount. > Simply comment out the > "udp tpi_clts v inet udp" > "tcp tpi_cots_ord v inet tcp" > > lines in the /etc/netconfig, at least in theory... > > So, I'm going to close this bug as WONTFIX and work with upstream > to eliminate this flag completely... I think .. we should from user perspective. If it can not turn off TCP, At least please delete the -n|--no-tcp option, and add description in man pages. please think if you are a user of the tools; The test is invalid, I would not flag this as a beta blocker or a test blocker (which holds up beta). We can certainly look at updating documentation and removing the option, but I suggest that is relatively low priority (although I do agree we should clean it up for users). Thanks! (In reply to Ric Wheeler from comment #7) > The test is invalid, I would not flag this as a beta blocker or a test > blocker (which holds up beta). Agreed to remove testblocker, if you insist; (I try other method to close tcp to reproduce ...) But Do not agree WONTFIX. > > We can certainly look at updating documentation and removing the option, but > I suggest that is relatively low priority (although I do agree we should > clean it up for users). Low priority is ok, unimportant. But for backward compatibility, not suggest delete the option. better fix it in RC, or more later if you have not time. > > Thanks! And.. I try the the follow patch, it works; you can and other condition: if ((-n) and (-N 4) and (netconfig is tcp)) continue; It is easy to fix. diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c index c159fc8..3bbeefc 100644 --- a/support/nfs/svc_create.c +++ b/support/nfs/svc_create.c @@ -416,6 +416,9 @@ nfs_svc_create(char *name, const rpcprog_t program, const rpcvers_t version, while ((nconf = getnetconfig(handlep)) != NULL) { if (!(nconf->nc_flag & NC_VISIBLE)) continue; + if (_rpcfdtype == SOCK_DGRAM && !strncmp(nconf->nc_proto,"tcp", 3)) { + continue; + } visible++; if (port == 0) servport = getservport(program, nconf->nc_proto); Although the -n option is not often used, but user can use it for debug/test and so on; and since it has not been deleted, please ensure that it functions available; And Please refer the rpc.nfsd implement: if can not turn off give reason for user. if no reason fix it. # rpc.nfsd -T rpc.nfsd: version 4 requires the TCP protocol [root@dhcp12-241 mountd]# rpc.nfsd --no-tcp rpc.nfsd: version 4 requires the TCP protocol [root@dhcp12-241 mountd]# echo $? 1 In fact nfs4 need not rpc.mountd as a rpc server, just as a userland daemon listen on the local rpc cache file; right? :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: /CoreOS/nfs-utils/commands/utils/rpc-mountd::Test ==- rpc.mountd -n --no-tcp :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ================================================================================ [01:38:31 root@ /mnt/tests/CoreOS/nfs-utils/commands/utils/rpc-mountd]# rpc.mountd -n -N 4 :: [ PASS ] :: Running 'rpc.mountd -n -N 4' (Expected 0, got 0) -------------------------------------------------------------------------------- ================================================================================ [01:38:31 root@ /mnt/tests/CoreOS/nfs-utils/commands/utils/rpc-mountd]# ps axf | grep -v grep | grep "rpc.mountd -n" 11046 ? Ss 0:00 rpc.mountd -n -N 4 :: [ PASS ] :: Running 'ps axf | grep -v grep | grep "rpc.mountd -n"' (Expected 0, got 0) -------------------------------------------------------------------------------- ================================================================================ [01:38:32 root@ /mnt/tests/CoreOS/nfs-utils/commands/utils/rpc-mountd]# rpcinfo -p | grep -w mountd | grep -w tcp :: [ PASS ] :: Running 'rpcinfo -p | grep -w mountd | grep -w tcp' (Expected 1, got 1) -------------------------------------------------------------------------------- ================================================================================ [01:38:32 root@ /mnt/tests/CoreOS/nfs-utils/commands/utils/rpc-mountd]# pkill rpc.mountd :: [ PASS ] :: Running 'pkill rpc.mountd' (Expected 0, got 0) -------------------------------------------------------------------------------- ================================================================================ [01:38:32 root@ /mnt/tests/CoreOS/nfs-utils/commands/utils/rpc-mountd]# rpc.mountd --no-tcp -N 4 :: [ PASS ] :: Running 'rpc.mountd --no-tcp -N 4' (Expected 0, got 0) -------------------------------------------------------------------------------- ================================================================================ [01:38:32 root@ /mnt/tests/CoreOS/nfs-utils/commands/utils/rpc-mountd]# ps axf | grep -v grep | grep "rpc.mountd --no-tcp" 11107 ? Ss 0:00 rpc.mountd --no-tcp -N 4 :: [ PASS ] :: Running 'ps axf | grep -v grep | grep "rpc.mountd --no-tcp"' (Expected 0, got 0) -------------------------------------------------------------------------------- ================================================================================ [01:38:32 root@ /mnt/tests/CoreOS/nfs-utils/commands/utils/rpc-mountd]# rpcinfo -p | grep -w mountd | grep -w tcp :: [ PASS ] :: Running 'rpcinfo -p | grep -w mountd | grep -w tcp' (Expected 1, got 1) -------------------------------------------------------------------------------- ================================================================================ [01:38:32 root@ /mnt/tests/CoreOS/nfs-utils/commands/utils/rpc-mountd]# pkill rpc.mountd :: [ PASS ] :: Running 'pkill rpc.mountd' (Expected 0, got 0) -------------------------------------------------------------------------------- This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. Additional info: fixed in upstream: commit a80482157632584ee03df58ed1eef3cefd95bbcb Author: Steve Dickson <steved> Date: Tue Nov 5 14:10:05 2013 -0500 mountd: Use protocol bit fields to turn protocols off. Convert the current code to used the NFSCTL_XXX macros to turn off the TCP listener. Signed-off-by: Steve Dickson <steved> |