Hide Forgot
+++ 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 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.
(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.
(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.
I still don't think its a bug... Its been this way forever and not one customer complaint... Closing.