Bug 984824 - [rpc.mountd] -n|--no-tcp option cannot work with -N 4
[rpc.mountd] -n|--no-tcp option cannot work with -N 4
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils (Show other bugs)
6.4
All Linux
high Severity high
: rc
: ---
Assigned To: Steve Dickson
Yin.JianHong
: Reopened, TestBlocker
Depends On:
Blocks: 859078 1011909 1013468 1127955 1127957
  Show dependency treegraph
 
Reported: 2013-07-16 02:48 EDT by Yin.JianHong
Modified: 2014-08-07 21:49 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1013468 1127955 (view as bug list)
Environment:
Last Closed: 2014-08-07 10:47:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yin.JianHong 2013-07-16 02:48:24 EDT
Description of problem:
mountd -n option cannot work.

Version-Release number of selected component (if applicable):
nfs-utils-1.2.3-36.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. add config item RPCMOUNTDOPTS="-n " in  /etc/sysconfig/nfs
2. service nfs restart
3. rpcinfo -s | grep mountd

Actual results:
# ps axf | grep mountd
20003 pts/1    S+     0:00              \_ grep mountd
19744 ?        Ss     0:00 rpc.mountd -n
# rpcinfo -s | grep mountd
    100005  3,2,1     tcp6,udp6,tcp,udp                mountd      superuser

Expected results:
# rpcinfo -s | grep mountd
    100005  3,2,1     udp6,udp                mountd      superuser


Additional info:
Comment 2 Yin.JianHong 2013-07-16 04:00:42 EDT
in rhel6.0 release version has the same problem.
    the package version nfs-utils-1.2.3-36.el6
and in a rhel6.0 alpha distro env. rpc.mountd -n works fine.
    package version nfs-utils-1.2.1-10.el6

so the bug introduced interval (1.2.1-10, 1.2.3-36]
Comment 4 Yin.JianHong 2013-09-03 03:09:03 EDT
RHEL6.5 has the same issue
Comment 5 Steve Dickson 2013-10-01 13:47:11 EDT
The reason --no-tcp does not work without turning off v4 (aka -N 4) is because
tcp is *required* by v4... If TCP could be turned off without turning
off v4, then that was bug...
Comment 6 Yin.JianHong 2013-10-07 21:52:36 EDT
(In reply to Steve Dickson from comment #5)
> The reason --no-tcp does not work without turning off v4 (aka -N 4) is
> because
> tcp is *required* by v4... If TCP could be turned off without turning
> off v4, then that was bug...

sorry, my mistake for description;

yes with -n -N 4 rpc.mountd still can not turn off TCP.
- And it cause bz859078 test case can not work.
Comment 7 Yin.JianHong 2013-10-07 21:59:03 EDT
Hi Steve

in RHEL7 has the same problem: bz1013468
please fix them together.
Comment 8 Steve Dickson 2013-10-08 10:51:31 EDT
(In reply to Yin.JianHong from comment #6)
> (In reply to Steve Dickson from comment #5)
> > The reason --no-tcp does not work without turning off v4 (aka -N 4) is
> > because
> > tcp is *required* by v4... If TCP could be turned off without turning
> > off v4, then that was bug...
> 
> sorry, my mistake for description;
> 
> yes with -n -N 4 rpc.mountd still can not turn off TCP.
> - And it cause bz859078 test case can not work.
I'm a bit confused there... The title of this bz is
   [rpc.mountd] -n|--no-tcp option cannot work

which is not the case as you have proven. You also need
the -N 4 to disable tcp, which is how it worked since
RHEL6.0. Point being this is not a regression. 

So why is this a Test Blocker??
Comment 9 Yin.JianHong 2013-10-08 21:32:55 EDT
(In reply to Steve Dickson from comment #8)
> (In reply to Yin.JianHong from comment #6)
> > (In reply to Steve Dickson from comment #5)
> > > The reason --no-tcp does not work without turning off v4 (aka -N 4) is
> > > because
> > > tcp is *required* by v4... If TCP could be turned off without turning
> > > off v4, then that was bug...
> > 
> > sorry, my mistake for description;
> > 
> > yes with -n -N 4 rpc.mountd still can not turn off TCP.
> > - And it cause bz859078 test case can not work.
> I'm a bit confused there... The title of this bz is
>    [rpc.mountd] -n|--no-tcp option cannot work
Sorry for the confuse,, I changed the title.
> 
> which is not the case as you have proven. You also need
> the -N 4 to disable tcp, which is how it worked since
> RHEL6.0. Point being this is not a regression. 
> 
> So why is this a Test Blocker??
because another bug's reproducer need "-n -N 4" disable tcp port.
Comment 10 Ric Wheeler 2013-10-09 19:22:58 EDT
I think that you need to fix your older test - that is a really old BZ, right?
Comment 11 Yin.JianHong 2013-10-09 20:52:45 EDT
(In reply to Ric Wheeler from comment #10)
> I think that you need to fix your older test - that is a really old BZ,
> right?

Is this reply for me? or steve?
If for me, the answer is no, 
 that is a new test for: mount.nfs negotiates suitable version with nfs server.

And I think if just specify -n option, rpc.mountd should output warning msg to user. or add doc description in man page.
Comment 12 Ric Wheeler 2013-10-10 09:33:52 EDT
This is listed as a release blocker for RHEL6.5. I don't see this as a critical issue and clearly it is not a blocker if this is just worked around with a man page update.

I am going to push it back to RHEL6.6, thanks!
Comment 13 Yin.JianHong 2013-10-29 06:54:28 EDT
(In reply to Ric Wheeler from comment #12)
> This is listed as a release blocker for RHEL6.5. I don't see this as a
> critical issue and clearly it is not a blocker if this is just worked around
> with a man page update.
No no no, update man page is an other question;
The bug in this bugzilla, is:
   rpc.mountd -n -N 4  can not work as expected, can not turn off the tcp port
> 
> I am going to push it back to RHEL6.6, thanks!
Comment 15 Steve Whitehouse 2014-07-31 10:16:05 EDT
I'm not sure I understand what the issue is here. NFSv4 doesn't support udp, so setting the version of NFS to 4, and saying "don't use tcp" doesn't make sense as what other transport can it use?
Comment 16 Yin.JianHong 2014-07-31 22:45:17 EDT
(In reply to Steve Whitehouse from comment #15)
> I'm not sure I understand what the issue is here. NFSv4 doesn't support udp,
> so setting the version of NFS to 4, and saying "don't use tcp" doesn't make
no, the options "-N 4 -n" means "disable nfs4 and disable tcp"

-------------------------------------------
Info of the -N option in man rpc.mountd(8)
       -N  or  --no-nfs-version
              This option can be used to request that rpc.mountd do not offer certain versions of NFS. The current version of rpc.mountd  can  support  both  NFS
              version 2, 3 and 4. If the either one of these version should not be offered, rpc.mountd must be invoked with the option --no-nfs-version <vers> .
-------------------------------------------

> sense as what other transport can it use?
Comment 17 Yin.JianHong 2014-07-31 23:41:55 EDT
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: /CoreOS/nfs-utils/commands/utils/rpc-mountd-Test-rpc.mountd -n --no-tcp
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

[23:29:21 root@ ~~]# rpc.mountd -n -N 4
:: [   PASS   ] :: Running 'rpc.mountd -n -N 4' (Expected 0, got 0)
--------------------------------------------------------------------------------
[23:29:22 root@ ~~]# ps axf | grep -v grep | grep "rpc.mountd -n"
 4702 ?        Ss     0:00 rpc.mountd -n -N 4
:: [   PASS   ] :: Running 'ps axf | grep -v grep | grep "rpc.mountd -n"' (Expected 0, got 0)
--------------------------------------------------------------------------------
[23:29:22 root@ ~~]# rpcinfo -p | grep -w mountd | grep -w tcp
    100005    1   tcp  41602  mountd
    100005    2   tcp  56913  mountd
    100005    3   tcp  48060  mountd
:: [   FAIL   ] :: should no tcp in rpcbind, rhel7(bz984824) (Expected 1, got 0)
--------------------------------------------------------------------------------
[23:29:22 root@ ~~]# pkill rpc.mountd
--------------------------------------------------------------------------------
[23:29:22 root@ ~~]# rpc.mountd --no-tcp -N 4
:: [   PASS   ] :: Running 'rpc.mountd --no-tcp -N 4' (Expected 0, got 0)
--------------------------------------------------------------------------------
[23:29:23 root@ ~~]# ps axf | grep -v grep | grep "rpc.mountd --no-tcp"
 4776 ?        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)
--------------------------------------------------------------------------------
[23:29:23 root@ ~~]# rpcinfo -p | grep -w mountd | grep -w tcp
    100005    1   tcp  45682  mountd
    100005    2   tcp  52036  mountd
    100005    3   tcp  38612  mountd
:: [   FAIL   ] :: should no tcp in rpcbind, rhel7(bz984824) (Expected 1, got 0)
--------------------------------------------------------------------------------
[23:29:23 root@ ~~]# pkill rpc.mountd
--------------------------------------------------------------------------------
Comment 18 Steve Whitehouse 2014-08-01 04:56:41 EDT
Ok, sorry. I see now. Thanks for confirming, that does sound like this needs to be fixed in that case.
Comment 19 Steve Dickson 2014-08-07 10:47:01 EDT
(In reply to Yin.JianHong from comment #13)
> (In reply to Ric Wheeler from comment #12)
> > This is listed as a release blocker for RHEL6.5. I don't see this as a
> > critical issue and clearly it is not a blocker if this is just worked around
> > with a man page update.
> No no no, update man page is an other question;
> The bug in this bugzilla, is:
>    rpc.mountd -n -N 4  can not work as expected, can not turn off the tcp
> port

It is true that -n no longer turns off tcp listeners. It happen when we
switch over from using glibc to libtirpc which was a number of years
ago. In this day and age, the last thing customers need to do is
turn off tcp.

Plus the only thing that has notice anomaly is our QE scripts,
meaning no customer complaints at all... 

So I suggest we close this bz as WONTFIX and open another bz
to remove the -n from the man page...

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