Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1007871

Summary: if the export entry invalid exportfs should not export it;
Product: Red Hat Enterprise Linux 7 Reporter: JianHong Yin <jiyin>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED NOTABUG QA Contact: JianHong Yin <jiyin>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: bfields
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1007868 Environment:
Last Closed: 2014-01-20 21:09:33 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: 1007868    
Bug Blocks:    

Description JianHong Yin 2013-09-13 13:26:20 UTC
+++ This bug was initially created as a clone of Bug #1007868 +++

Description of problem:
if the export entry invalid should not export it;

Version-Release number of selected component (if applicable):
[root@dhcp12-185 ~]# lsb_release -sir; rpm -q nfs-utils; uname -r
RedHatEnterpriseServer 7.0
nfs-utils-1.2.8-2.0.el7.x86_64 and all version in 6.x
3.10.0-9.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:
[root@dhcp12-185 ~]# exportfs -ua
[root@dhcp12-185 ~]# exportfs -i  *:/not.exist
exportfs: Failed to stat /not.exist: No such file or directory
[root@dhcp12-185 ~]# echo $?
0
[root@dhcp12-185 ~]# exportfs
/not.exist    	<world>


Expected results:
should return !0
should not export it

Additional info:

Comment 2 J. Bruce Fields 2013-12-11 20:51:23 UTC
Comment on validate_export says "We just give warnings here, don't cause anything to fail.", so I guess this was intentional, I'm not sure why.  Are there cases where we want to set up the exports before everything's mounted?  It seems strange.

It appears exportfs has behaved this way forever, so I'm inclined to leave it as is.

Comment 3 J. Bruce Fields 2013-12-11 20:53:11 UTC
(In reply to J. Bruce Fields from comment #2)
> Comment on validate_export says "We just give warnings here, don't cause
> anything to fail.", so I guess this was intentional, I'm not sure why.  Are
> there cases where we want to set up the exports before everything's mounted?
> It seems strange.
> 
> It appears exportfs has behaved this way forever, so I'm inclined to leave
> it as is.

Yes, see Neil Brown's 1374c3861abdc66f3a1410e26cc85f86760b51dd "exportfs - test exportability of filesystems when exportfs is run.", which says "Don't actually fail the 'exportfs' as by the time a MOUNT request arrives, the filesystem might be exportable."

Honestly, I don't know what the best behavior is, but for now I think we should leave it as is.

If someone shows this is causing an actual problem for them, then we can reopen.

Comment 4 JianHong Yin 2013-12-12 03:40:13 UTC
(In reply to J. Bruce Fields from comment #3)
> (In reply to J. Bruce Fields from comment #2)
> > Comment on validate_export says "We just give warnings here, don't cause
> > anything to fail.", so I guess this was intentional, I'm not sure why.  Are
> > there cases where we want to set up the exports before everything's mounted?
> > It seems strange.
> > 
> > It appears exportfs has behaved this way forever, so I'm inclined to leave
> > it as is.
> 
> Yes, see Neil Brown's 1374c3861abdc66f3a1410e26cc85f86760b51dd "exportfs -
> test exportability of filesystems when exportfs is run.", which says "Don't
> actually fail the 'exportfs' as by the time a MOUNT request arrives, the
> filesystem might be exportable."
> 
> Honestly, I don't know what the best behavior is, but for now I think we
> should leave it as is.
  and an flag to every exported item?
> 
> If someone shows this is causing an actual problem for them, then we can
> reopen.

some user say that:
  we "showmount -e $host" and get an exported list,
  but mount some fail,,, by debug: the reason is these exported dir is invalide.

so we think : if it's invalid, then should not show to user by "showmount -e".

so try to reopen.

Comment 5 Steve Dickson 2014-01-20 21:09:33 UTC
I still don't think its a bug... Its been this way forever and not one
customer complaint... Closing.