RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1005697 - mount.nfs exit code not right.
Summary: mount.nfs exit code not right.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils
Version: 6.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks: 1005716
TreeView+ depends on / blocked
 
Reported: 2013-09-09 08:31 UTC by JianHong Yin
Modified: 2017-12-06 11:55 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1005716 (view as bug list)
Environment:
Last Closed: 2017-12-06 11:55:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description JianHong Yin 2013-09-09 08:31:06 UTC
Description of problem:
mount.nfs exit code not right.

Version-Release number of selected component (if applicable):
see Actual results:

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:
[root@dhcp-13-188 ~]# lsb_release  -sr
6.4
[root@dhcp-13-188 ~]# rpm -q nfs-utils
nfs-utils-1.2.3-36.el6.x86_64
[root@dhcp-13-188 ~]# exportfs 
/tmp            <world>
/mnt/test       <world>
[root@dhcp-13-188 ~]# mount.nfs -overs=3   localhost:/tmp   /media/
usage: mount.nfs remotetarget dir [-rvVwfnsih] [-o nfsoptions]
options:
        -r              Mount file system readonly
        -v              Verbose
        -V              Print version
        -w              Mount file system read-write
        -f              Fake mount, do not actually mount
        -n              Do not update /etc/mtab
        -s              Tolerate sloppy mount options rather than fail
        -h              Print this help
        nfsoptions      Refer to mount.nfs(8) or nfs(5)

[root@dhcp-13-188 ~]# echo $?
0
[root@dhcp-13-188 ~]# mount.nfs -o vers=3   localhost:/tmp   /media/
usage: mount.nfs remotetarget dir [-rvVwfnsih] [-o nfsoptions]
options:
        -r              Mount file system readonly
        -v              Verbose
        -V              Print version
        -w              Mount file system read-write
        -f              Fake mount, do not actually mount
        -n              Do not update /etc/mtab
        -s              Tolerate sloppy mount options rather than fail
        -h              Print this help
        nfsoptions      Refer to mount.nfs(8) or nfs(5)

[root@dhcp-13-188 ~]# echo $?
0


Expected results:
if error, exit code should be !0

Additional info:

Comment 1 JianHong Yin 2013-09-09 08:31:30 UTC
[root@ibm-x3550m3-03 ~]# lsb_release -sir
RedHatEnterpriseWorkstation 6.5
[root@ibm-x3550m3-03 ~]# rpm -q nfs-utils
nfs-utils-1.2.3-38.el6.x86_64
[root@ibm-x3550m3-03 ~]# exportfs 
/tmp            <world>
[root@ibm-x3550m3-03 ~]# mount.nfs -overs=3  localhost:/tmp  /media/
usage: mount.nfs remotetarget dir [-rvVwfnsih] [-o nfsoptions]
options:
        -r              Mount file system readonly
        -v              Verbose
        -V              Print version
        -w              Mount file system read-write
        -f              Fake mount, do not actually mount
        -n              Do not update /etc/mtab
        -s              Tolerate sloppy mount options rather than fail
        -h              Print this help
        nfsoptions      Refer to mount.nfs(8) or nfs(5)

[root@ibm-x3550m3-03 ~]# echo $?
0
[root@ibm-x3550m3-03 ~]# mount.nfs -o vers=3  localhost:/tmp  /media/
usage: mount.nfs remotetarget dir [-rvVwfnsih] [-o nfsoptions]
options:
        -r              Mount file system readonly
        -v              Verbose
        -V              Print version
        -w              Mount file system read-write
        -f              Fake mount, do not actually mount
        -n              Do not update /etc/mtab
        -s              Tolerate sloppy mount options rather than fail
        -h              Print this help
        nfsoptions      Refer to mount.nfs(8) or nfs(5)

[root@ibm-x3550m3-03 ~]# echo $?
0
[root@ibm-x3550m3-03 ~]# cat /etc/issue
Red Hat Enterprise Linux Workstation release 6.5 Beta (Santiago)
Kernel \r on an \m

Comment 3 RHEL Program Management 2013-10-14 02:20:00 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Steve Whitehouse 2015-12-11 18:27:15 UTC
This is more important than the help text bugs, since this actually might affects someone's scripts. Again, needs to be checked and done upstream first though.

Comment 5 ChunYu Wang 2016-11-15 18:14:13 UTC
With the similar steps, seems `mount -o<Option List>` without a space could work as normal options, according to the man pages, this syntax should be a kind of mistake.

== On RHEL-6.8 ==
[root@kvm-guest-05 ~]# mount -overs=3 localhost:/ /mnt/nfsmp/
[root@kvm-guest-05 ~]# echo $?
0
[root@kvm-guest-05 ~]# uname -r
2.6.32-642.el6.x86_64
[root@kvm-guest-05 ~]# rpm -qa|grep nfs-utils
nfs-utils-lib-1.1.5-11.el6.x86_64
nfs-utils-1.2.3-70.el6.x86_64
[root@kvm-guest-05 ~]# mount |grep mnt/nfsmp/
localhost:/ on /mnt/nfsmp type nfs (rw,vers=3,addr=::1)


== On FC 24 ==
[root@dhcp-12-154 ~]# mount -onoac localhost:/nfs /nfs_in/
[root@dhcp-12-154 ~]# echo $?
0
[root@dhcp-12-154 ~]# mount | grep nfs_in
localhost:/nfs on /nfs_in type nfs4 (rw,relatime,sync,seclabel,vers=4.2,rsize=524288,wsize=524288,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,noac,proto=tcp6,port=0,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1)
[root@dhcp-12-154 ~]# uname -r
4.8.6-201.fc24.x86_64


== In man pages ==
-o, --options opts
Use the specified mount options. The opts argument is a separated list.

Comment 7 Jan Kurik 2017-12-06 11:55:05 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/


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