Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 513466

Summary: Failure to Unmount UDP NFS Filesystems
Product: Red Hat Enterprise Linux 5 Reporter: Chris Hollowell <hollowec>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: yanfu,wang <yanwang>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: jlayton
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nfs-utils-1.0.9-52.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 11:34:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch which resolves the issue none

Description Chris Hollowell 2009-07-23 18:49:05 UTC
Description of problem:
There appears to be a bug in nfs-utils which causes unmount requests 
to mountd to be attempted via TCP even when an NFS filesystem is mounted 
via UDP.  In cases where the NFS server's mountd implementation only
supports UDP, this causes unmounts to fail, unless '-f' is passed to
umount/umount.nfs.

Version-Release number of selected component (if applicable):
1.0.9-40.el5

How reproducible:
Always.

Steps to Reproduce:
1.  Mount an NFS filesystem via UDP from a server which only
    supports UDP mountd operations.
2.  Attempt to unmount the filesystem.
3.
  
Actual results:
The following error messages are reported by umount/umount.nfs, and the 
filesystem remains mounted:
umount.nfs: server.mydomain:/fs: not found / mounted or server not reachable
umount.nfs: server.mydomain:/fs: not found / mounted or server not reachable

Expected results:
The filesystem should be unmounted.

Additional info:
I believe this issue is caused by umount.nfs' invocation of hasmntopt() with 
an invalid /proc/mounts NFS mount option ("udp", rather than "proto=udp").  
A patch which seems to correct the problem is attached.

Comment 1 Chris Hollowell 2009-07-23 18:50:58 UTC
Created attachment 354905 [details]
Patch which resolves the issue

Comment 2 RHEL Program Management 2010-09-16 16:57:30 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2011-01-11 20:06:39 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2011-01-11 23:11:32 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 7 yanfu,wang 2011-05-16 06:52:38 UTC
reproduced on nfs-utils-1.0.9-51.el5:
[root@nec-em24-1 ~]# rpm -qa|grep nfs-utils
nfs-utils-1.0.9-51.el5
nfs-utils-lib-1.0.8-7.6.el5

[root@nec-em24-1 ~]# mount -t nfs -o proto=udp localhost:/tmp /mnt
...
localhost:/tmp /mnt nfs rw,vers=3,rsize=32768,wsize=32768,hard,proto=udp,timeo=11,retrans=2,sec=sys,addr=localhost 0 0
[root@nec-em24-1 ~]# umount /mnt
[root@nec-em24-1 ~]# mount -t nfs -o proto=udp localhost:/tmp /mnt
[root@nec-em24-1 ~]# vim /var/log/messages 
[root@nec-em24-1 ~]# umount /mnt -vvv
Trying to umount /mnt
mount: trying 127.0.0.1 prog 100005 vers 1 prot tcp port 688

verified patch nfs-utils-1.0.9-mount-udp-only.patch is been applied in nfs-utils-1.0.9-52.el5, and test results are fine by testing on i386 and x86_64:
[root@hp-dl2x170g6-01 redhat]# rpm -qa|grep nfs-utils
nfs-utils-lib-1.0.8-7.6.el5
nfs-utils-1.0.9-52.el5
[root@hp-dl2x170g6-01 redhat]# cat /etc/exports 
/tmp *(rw)
[root@hp-dl2x170g6-01 redhat]# mount -t nfs -o proto=udp localhost:/tmp /mnt
[root@hp-dl2x170g6-01 redhat]# cat /proc/mounts 
localhost:/tmp /mnt nfs rw,vers=3,rsize=32768,wsize=32768,hard,proto=udp,timeo=11,retrans=2,sec=sys,addr=localhost 0 0
[root@hp-dl2x170g6-01 redhat]# umount /mnt -vvv
Trying to umount /mnt
mount: trying 127.0.0.1 prog 100005 vers 1 prot udp port 610
localhost:/tmp umounted

Comment 8 errata-xmlrpc 2011-07-21 11:34:52 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 therefore 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-2011-1048.html