Bug 966237 - exportfs: Returns zero exit status when it fails to create export
exportfs: Returns zero exit status when it fails to create export
Product: Fedora
Classification: Fedora
Component: nfs-utils (Show other bugs)
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Steve Dickson
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-05-22 16:28 EDT by Tony Asleson
Modified: 2013-12-09 09:53 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-09 09:53:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tony Asleson 2013-05-22 16:28:21 EDT
Description of problem:

When using exportfs to create an export the command will fail, but the exit code will indicate success (0).

Version-Release number of selected component (if applicable):

All versions tried exibit same behavior

How reproducible:


Steps to Reproduce:

Example 1.

# exportfs non-existant-host:/mnt ; echo $? ; exportfs -v
exportfs: Failed to resolve non-existant-host

Example 2:

# exportfs -u 2001:470:8:d63::/64:/mnt ; echo $? ; exportfs -v
exportfs: Invalid unexporting option: 2001

Actual results:
echo $? = 0

Expected results:
echo $? != 0

Additional info:

This would be very helpful for users that are scripting NFS export management with exportfs so that a consistent and reliable way can be used for determining command execution results.  

The command is working as expected for other error senarios.


# exportfs -o what_root_squash non-existant-host:/mnt ; echo $? ; exportfs -v
exportfs: command line:0: unknown keyword "what_root_squash"

Comment 1 Fedora End Of Life 2013-09-16 09:59:44 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
Comment 2 Steve Dickson 2013-12-09 09:53:51 EST
This has been fixed by this upstream commit

commit d4a408776d611cd62235232d65d488d02fca78e4
Author: NeilBrown <neilb@suse.de>
Date:   Tue Nov 5 14:03:53 2013 -0500

    exportfs: exit with error code if there was any error (take 2).

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