Bug 1166585 - Empty /etc/exports (or non existent) breaks exportfs
Summary: Empty /etc/exports (or non existent) breaks exportfs
Keywords:
Status: CLOSED DUPLICATE of bug 1164477
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-21 09:59 UTC by Pavel Raiskup
Modified: 2014-11-21 12:30 UTC (History)
3 users (show)

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


Attachments (Terms of Use)
proposed solution (4.97 KB, patch)
2014-11-21 10:46 UTC, Pavel Raiskup
no flags Details | Diff
Proposed solution (fixed && usage) (5.22 KB, patch)
2014-11-21 11:09 UTC, Pavel Raiskup
no flags Details | Diff

Description Pavel Raiskup 2014-11-21 09:59:14 UTC
I use files in /etc/exports.d/ to control my exports.  That has advantages
when dealing with exports from remote machine using some orchestration FW
(ansible in my case) - no need to parse/edit /etc/exports file directly.

Consider I have 'backend' host specified in /etc/hosts file, I have something
like:

  # cat /etc/exports
  # cat /etc/exports.d/test.exports 
  /data/nfs-points/results backend(rw,no_root_squash)
  /data/nfs-points/lock-builder backend(rw,no_root_squash)
  # exportfs -va
  exportfs: No file systems exported!
  exporting backend:/data/nfs-points/lock-builder
  exporting backend:/data/nfs-points/results
  # echo $?
  1

That ^^ exit value breaks 'systemctl start nfs-server'.  During parsing of
'/etc/exports', the 'exports_errno' is set (and warning is thrown to stderr)
and then it is propagated as program exit value.

  # rm /etc/exports
  # exportfs -va
  exportfs: can't open /etc/exports for reading
  exportfs: No file systems exported!
  exporting backend:/data/nfs-points/lock-builder
  exporting backend:/data/nfs-points/results

So no "easy" solution for this?

Pavel

Comment 1 Pavel Raiskup 2014-11-21 10:46:51 UTC
Created attachment 959651 [details]
proposed solution

Comment 2 Pavel Raiskup 2014-11-21 11:09:28 UTC
Created attachment 959656 [details]
Proposed solution (fixed && usage)

Comment 3 Steve Dickson 2014-11-21 12:30:50 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.