Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1395062

Summary: NFS server fails to start if any hostnames in /etc/exports are not resolvable
Product: Red Hat Enterprise Linux 7 Reporter: Daphne Shaw <dshaw>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED DUPLICATE QA Contact: ChunYu Wang <chunwang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: chunwang, yoyang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-15 06:31:01 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:

Description Daphne Shaw 2016-11-15 03:45:06 UTC
Description of problem:

If any of the hostnames in /etc/exports are not resolvable, the NFS server will not start.

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

nfs-utils-1.3.0-0.21.el7_2.x86_64

How reproducible:

Every time.

Steps to Reproduce:
1. Put several entries with valid hostnames and a single entry with an invalid (not found) hostname in /etc/exports.
2. Try and start nfs-server.

Actual results:

nfs-server won't start for any entries.

Expected results:

nfs-server will start, at least for those entries that have valid hostnames.

Additional info:

Obviously, exporting the entry with the not-found hostname isn't going to work.  The unexpected behavior here is that the presence of a single bad entry prevents any number of good entries from getting service.

This seems to be the same thing as bug 1115179, which was fixed in Fedora 20.

Comment 1 ChunYu Wang 2016-11-15 05:52:20 UTC
Hi, Shaw,

I have tracked no reproduction on RHEL-7.3 with nfs-utils-1.3.0-0.31.el7.x86_64

[root@hp-dl360g9-14 ~]# exportfs -arv
exportfs: Failed to resolve notExisted.test.redhat.com
exportfs: Failed to resolve notExisted.test.redhat.com
exporting *:/
[root@hp-dl360g9-14 ~]# echo $?
0
[root@hp-dl360g9-14 ~]# echo $?
0
[root@hp-dl360g9-14 ~]# exportfs -arv
exportfs: Failed to resolve notExisted.test.redhat.com
exportfs: Failed to resolve notExisted.test.redhat.com
exporting *:/
[root@hp-dl360g9-14 ~]# echo $?
0
[root@hp-dl360g9-14 ~]# cat /etc/exports
/ notExisted.test.redhat.com(rw,no_root_squash)
/ *(rw,no_root_squash)

[root@hp-dl360g9-14 ~]# systemctl restart nfs
[root@hp-dl360g9-14 ~]# systemctl status nfs
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
   Active: active (exited) since Tue 2016-11-15 00:46:53 EST; 2s ago
  Process: 1237 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 1235 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 1237 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs-server.service
[root@hp-dl360g9-14 ~]# rpm -qa |grep nfs-utils
nfs-utils-1.3.0-0.31.el7.x86_64

Comment 3 Yongcheng Yang 2016-11-15 06:37:21 UTC
(In reply to David Shaw from comment #0)
> 
> Version-Release number of selected component (if applicable):
> 
> nfs-utils-1.3.0-0.21.el7_2.x86_64
> 

(In reply to ChunYu Wang from comment #1)
> Hi, Shaw,
> 
> I have tracked no reproduction on RHEL-7.3 with
> nfs-utils-1.3.0-0.31.el7.x86_64
> 

This issue has been fixed in Version nfs-utils-1.3.0-0.24.el7 and delivered by RHEL-7.3.

And maybe we can request zstream fix if need it in RHEL-7.2.

Comment 4 Daphne Shaw 2016-11-15 16:14:20 UTC
Ah, very nice.  I haven't upgraded to 7.3 yet, but I'll check this out.  Thanks.