Bug 1007871 - if the export entry invalid exportfs should not export it;
Summary: if the export entry invalid exportfs should not export it;
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: JianHong Yin
URL:
Whiteboard:
Depends On: 1007868
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-13 13:26 UTC by JianHong Yin
Modified: 2014-01-20 21:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1007868
Environment:
Last Closed: 2014-01-20 21:09:33 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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