Bug 1164353 - Recent update to nfs-utils-1.3.0-2.3 (bz 1115179) introduces a new bug in exportfs
Summary: Recent update to nfs-utils-1.3.0-2.3 (bz 1115179) introduces a new bug in exp...
Keywords:
Status: CLOSED DUPLICATE of bug 1164477
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-14 18:09 UTC by Fritz Elfert
Modified: 2014-11-21 12:32 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-11-21 12:32:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to fix the behavior (Use as patch004 on top of nfs-utils-1.3.0-exportfs-nofail.patch) (439 bytes, patch)
2014-11-14 18:37 UTC, Fritz Elfert
no flags Details | Diff

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 ***


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