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 1709963 - mounting a nonexistent exports give the wrong error
Summary: mounting a nonexistent exports give the wrong error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nfs-utils
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.1
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard: bakeathon
Depends On: 1709961
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-14 16:18 UTC by Steve Dickson
Modified: 2020-11-14 06:08 UTC (History)
7 users (show)

Fixed In Version: nfs-utils-2.3.3-24.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1709961
: 1752329 (view as bug list)
Environment:
Last Closed: 2019-11-05 22:18:26 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3579 0 None None None 2019-11-05 22:19:43 UTC

Description Steve Dickson 2019-05-14 16:18:51 UTC
+++ This bug was initially created as a clone of Bug #1709961 +++

Description of problem:

mount server:/badexportdir /mnt/tmp fails with
   mount.nfs: Network is unreachable

The mount should fail with 
mount.nfs: mounting server:/badexportdir failed, reason given by server: No such file or directory

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


How reproducible:
100%

Steps to Reproduce:
1. see above

Comment 1 Yongcheng Yang 2019-05-15 03:01:06 UTC
We already have testcase to cover this scenario.
But the given error message is different:

(In reply to Steve Dickson from comment #0)
> ...
> mount server:/badexportdir /mnt/tmp fails with
>    mount.nfs: Network is unreachable
> 
> The mount should fail with 
> mount.nfs: mounting server:/badexportdir failed, reason given by server: No such file or directory
> 

[root@ ~]# exportfs -v
/export_test    <world>(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)
[root@ ~]# mount $HOSTNAME:/not_exist/ /mnt/
mount.nfs: access denied by server while mounting hp-dl380pg8-09.rhts.eng.pek2.redhat.com:/not_exist/
          ^^^^^^^^^^^^^^^
[root@ ~]# rpm -q nfs-utils
nfs-utils-2.3.3-14.el8_0.x86_64

Will update the existing testcase according to this bug fix.

Comment 2 Steve Whitehouse 2019-08-12 12:24:10 UTC
I assume from the other bug mentioned in the opening comment that we have a fix for this... is there any reason why this cannot be posted in that case? It looks like another one which should be fairly easy to fix.

Comment 4 Yongcheng Yang 2019-08-27 02:10:33 UTC
Have verified in nfs-utils-2.3.3-24.el8
---------------------------------------
[22:03:57 root@ ~~]# timeLimitRun 180 mount 127.0.0.1:/notexistdir /mnt/nfsmp &> >(tee failure.log)
mount.nfs: mounting 127.0.0.1:/notexistdir failed, reason given by server: No such file or directory
                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^
[22:03:57 root@ ~~]# timeLimitRun 180 mount -t nfs -o vers=3 127.0.0.1:/notexistdir /mnt/nfsmp &> >(tee failure_v3.log)
mount.nfs: access denied by server while mounting 127.0.0.1:/notexistdir
[22:03:58 root@ ~~]# timeLimitRun 180 mount -t nfs4 127.0.0.1:/notexistdir /mnt/nfsmp &> >(tee failure_v4.log)
mount.nfs4: mounting 127.0.0.1:/notexistdir failed, reason given by server: No such file or directory
[22:03:58 root@ ~~]# diff <(cut -d' ' -f2- failure.log) <(cut -d' ' -f2- failure_v4.log)


Compared with nfs-utils-2.3.3-23.el8
---------------------------------------
[22:03:22 root@ ~~]# timeLimitRun 180 mount 127.0.0.1:/notexistdir /mnt/nfsmp &> >(tee failure.log)
mount.nfs: access denied by server while mounting 127.0.0.1:/notexistdir
           ^^^^^^^^^^^^
[22:03:23 root@ ~~]# timeLimitRun 180 mount -t nfs -o vers=3 127.0.0.1:/notexistdir /mnt/nfsmp &> >(tee failure_v3.log)
mount.nfs: access denied by server while mounting 127.0.0.1:/notexistdir
[22:03:23 root@ ~~]# timeLimitRun 180 mount -t nfs4 127.0.0.1:/notexistdir /mnt/nfsmp &> >(tee failure_v4.log)
mount.nfs4: mounting 127.0.0.1:/notexistdir failed, reason given by server: No such file or directory
[22:03:23 root@ ~~]# diff <(cut -d' ' -f2- failure.log) <(cut -d' ' -f2- failure_v4.log)
1c1
< access denied by server while mounting 127.0.0.1:/notexistdir
---
> mounting 127.0.0.1:/notexistdir failed, reason given by server: No such file or directory
^^^^^^ FAIL - Should use original v4 failure in fall_back cases

Comment 6 errata-xmlrpc 2019-11-05 22:18:26 UTC
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-2019:3579


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