Bug 1164353

Summary: Recent update to nfs-utils-1.3.0-2.3 (bz 1115179) introduces a new bug in exportfs
Product: [Fedora] Fedora Reporter: Fritz Elfert <fritz>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 20CC: bfields, fritz, jlayton, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-21 12:32:55 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:
Attachments:
Description Flags
Patch to fix the behavior (Use as patch004 on top of nfs-utils-1.3.0-exportfs-nofail.patch) none

Description Fritz Elfert 2014-11-14 18:09:07 UTC
Description of problem:
After updating nfs-utils, the service does not start anymore, because bz 1115179
introduces an error in the application logic of exportfs. (Failins when reading an empty /etc/exports - which is perfectly ok)

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


How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
nfs-server fails to start, because
ExecStartPre=/usr/sbin/exportfs -r
fails with exit-code 1


Expected results:
nfs-server should start even if one of the exports files is empty.

Additional info:


When looking at the diff of bz 1115179, it becomes clear that the newly added lines:
++ int volumes = 0;

and

++ if (volumes == 0)
++ xlog(L_ERROR, "No file systems exported!");

introduce a new (wrong) behavior (failing with exit code 1 if an exports file does not result in any exports, because it is either empty or only consists of commented lines) - Please note: Invoking xlog(L_ERROR,...) does not only log but also results in an exit(1) because it sets export_errno to 1!


However: An empty or commented exports file is perfectly legal!
This situation happens for example, if one adheres to the recommended use by *not* adding export definitions to the default file /etc/exports (provided by setup-2.8.71-2.fc20.noarch) but adding new .exports files below /etc/exports.d/.

=>
Instead of invoking xlog(L_ERROR,...) this should probably reduced to a warning (which does not result in an exit of the tool). Furthermore the log message is *not* very helful unless the file name in question is reported as well...

CU
 -Fritz

Comment 1 Fritz Elfert 2014-11-14 18:37:50 UTC
Created attachment 957698 [details]
Patch to fix the behavior (Use as patch004 on top of nfs-utils-1.3.0-exportfs-nofail.patch)

Comment 2 Fritz Elfert 2014-11-15 12:14:32 UTC
BTW: The commit which I'm talking about in my original report is this one:
http://pkgs.fedoraproject.org/cgit/nfs-utils.git/commit/?h=f20&id=2e682e7bcc96558fa2b3e0a611d6093a630b87e3

Comment 3 Steve Dickson 2014-11-21 12:32:55 UTC

*** This bug has been marked as a duplicate of bug 1164477 ***