RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1340788 - [exportfs] should not fail on empty exports file with "No file systems exported"
Summary: [exportfs] should not fail on empty exports file with "No file systems exported"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-30 09:48 UTC by Yongcheng Yang
Modified: 2016-11-04 05:04 UTC (History)
2 users (show)

Fixed In Version: nfs-utils-1.3.0-0.29.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 05:04:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1287468 0 urgent CLOSED Unable to start nfs server.service if any of the client is down and dns unable to resolve the client name 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2016:2383 0 normal SHIPPED_LIVE nfs-utils bug fix and enhancement update 2016-11-03 13:53:02 UTC

Internal Links: 1287468

Description Yongcheng Yang 2016-05-30 09:48:55 UTC
Description of problem:
bug 1287468 introduced a regression that causes exportfs to fail when there is an empty /etc/exports file. A empty /etc/exports file is valid and should not cause exportfs to fail.

Version-Release number of selected component (if applicable):
RHEL-7.2 with nfs-utils-1.3.0-0.24.el7

How reproducible:
100% easy

Steps to Reproduce:
1. echo "" >/etc/exports
2. exportfs -a
3. echo $?

Actual results:
[root@hp-dl385pg8-08 ~]# >/etc/exports
[root@hp-dl385pg8-08 ~]# ls /etc/exports.d/
[root@hp-dl385pg8-08 ~]# exportfs -a
exportfs: No file systems exported!
[root@hp-dl385pg8-08 ~]# echo $?
1
[root@hp-dl385pg8-08 ~]# exportfs -r
exportfs: No file systems exported!
[root@hp-dl385pg8-08 ~]# echo $?
1
[root@hp-dl385pg8-08 ~]# 
[root@hp-dl385pg8-08 ~]# cat /etc/exports
[root@hp-dl385pg8-08 ~]# echo "/tmp *(rw,no_root_squash)" > /etc/exports.d/test.exports
[root@hp-dl385pg8-08 ~]# exportfs -a
exportfs: No file systems exported!
[root@hp-dl385pg8-08 ~]# echo $?
1
[root@hp-dl385pg8-08 ~]# exportfs -v
/tmp          	<world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)
[root@hp-dl385pg8-08 ~]# 

Expected results:
A empty /etc/exports file is valid and should not cause exportfs to fail

Additional info:
N/A

Comment 1 Yongcheng Yang 2016-05-30 09:56:56 UTC
May need the following upstream patches:

commit d6ef125c4be83de1d94727bf6be74cd7c0bf424c
Author: Pavel Raiskup <praiskup>
Date:   Wed Dec 3 17:10:11 2014 -0500

    exportfs: warn when really nothing is exported
    
    Throw 'No file systems exported!' iff no volume is exported rather
    then if some exports file is empty.  Typically this can happen if
    the default /etc/exports file is empty and admin installed
    configuration into /etc/exports.d directory.
    
    This is follow-up for e725def62c73b4 commit.
    


commit e725def62c73b4aa269fefc4c0d96abb41927fcb
Author: Steve Dickson <steved>
Date:   Mon Nov 17 13:17:20 2014 -0500

    exportfs: Do not fail on empty exports file.
    
    Commit 076dd80 introduced a regression that causes
    exportfs to fail when there is an empty /etc/exports
    file. A empty /etc/exports file is valid and should
    not cause exportfs to fail.

Comment 3 Yongcheng Yang 2016-06-12 02:35:29 UTC
Verified with nfs-utils-1.3.0-0.29.el7

Move to VERIFIED and continue to run the automatic case.

[root@ibm-x3550m4-02 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.29.el7.x86_64
[root@ibm-x3550m4-02 ~]# >/etc/exports
[root@ibm-x3550m4-02 ~]# ls /etc/exports.d/
[root@ibm-x3550m4-02 ~]# exportfs -a
[root@ibm-x3550m4-02 ~]# echo $?
0
[root@ibm-x3550m4-02 ~]# exportfs -r
[root@ibm-x3550m4-02 ~]# echo $?
0
[root@ibm-x3550m4-02 ~]# 
[root@ibm-x3550m4-02 ~]# echo "/tmp *(rw,no_root_squash)" > /etc/exports.d/test.exports
[root@ibm-x3550m4-02 ~]# exportfs -a
[root@ibm-x3550m4-02 ~]# exportfs -v
/tmp          	<world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)
[root@ibm-x3550m4-02 ~]#

Comment 5 errata-xmlrpc 2016-11-04 05:04: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-2016-2383.html


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