Bug 1276221

Summary: exportfs -u always return 0 even if unexport failed actually
Product: Red Hat Enterprise Linux 6 Reporter: Yongcheng Yang <yoyang>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: unspecified Docs Contact: Milan Navratil <mnavrati>
Priority: unspecified    
Version: 6.7CC: coughlan, eguan, sbradley
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs-utils-1.2.3-74.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 11:23:01 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:

Description Yongcheng Yang 2015-10-29 06:52:39 UTC
Description of problem:
When using "exportfs -u" to unexport just one directory, it always return 0 even if unexport failed actually.

Version-Release number of selected component (if applicable):
nfs-utils-1.2.3-64.el6

How reproducible:
100%

Steps to Reproduce:
1. exportfs -u no_exit:/export/
2. echo $?

Actual results:
[root@ibm-x3650m4-08 ~]# exportfs -v
[root@ibm-x3650m4-08 ~]# exportfs -u no_exit:/export/
[root@ibm-x3650m4-08 ~]# echo $?
0
[root@ibm-x3650m4-08 ~]#

Expected results:
Don't return 0 if unexport failed

Additional info:
It was found when test Bug 1276099 in RHEL6:
[root@ibm-x3650m4-08 ~]# exportfs -ua
[root@ibm-x3650m4-08 ~]# exportfs -v
[root@ibm-x3650m4-08 ~]# exportfs -o rw,sync $HOSTNAME:/export/
[root@ibm-x3650m4-08 ~]# exportfs -v
/export       	ibm-x3650m4-08.rhts.eng.pek2.redhat.com(rw,wdelay,root_squash,no_subtree_check,sec=sys,rw,root_squash,no_all_squash)
[root@ibm-x3650m4-08 ~]# exportfs -u $HOSTNAME:/export/
[root@ibm-x3650m4-08 ~]# echo $?
0
[root@ibm-x3650m4-08 ~]# exportfs -v
/export       	ibm-x3650m4-08.rhts.eng.pek2.redhat.com(rw,wdelay,root_squash,no_subtree_check,sec=sys,rw,root_squash,no_all_squash)
[root@ibm-x3650m4-08 ~]# exportfs -u ibm-x3650m4-08.rhts.eng.pek2.redhat.com:/export
[root@ibm-x3650m4-08 ~]# echo $?
0
[root@ibm-x3650m4-08 ~]# exportfs -v
[root@ibm-x3650m4-08 ~]#

Comment 5 Yongcheng Yang 2016-12-12 04:12:39 UTC
Moving to VERIFIED as test log in Comment #4.

And will include this automatic case into regression test list.

Comment 8 errata-xmlrpc 2017-03-21 11:23:01 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://rhn.redhat.com/errata/RHBA-2017-0741.html