Bug 1007871 - if the export entry invalid exportfs should not export it;
if the export entry invalid exportfs should not export it;
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils (Show other bugs)
7.0
All Linux
high Severity medium
: rc
: ---
Assigned To: Steve Dickson
Yin.JianHong
: Reopened
Depends On: 1007868
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-13 09:26 EDT by Yin.JianHong
Modified: 2014-01-20 16:09 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1007868
Environment:
Last Closed: 2014-01-20 16:09:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yin.JianHong 2013-09-13 09:26:20 EDT
+++ 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 15:51:23 EST
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 15:53:11 EST
(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 Yin.JianHong 2013-12-11 22:40:13 EST
(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 16:09:33 EST
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.