Bug 1395062 - NFS server fails to start if any hostnames in /etc/exports are not resolvable
Summary: NFS server fails to start if any hostnames in /etc/exports are not resolvable
Keywords:
Status: CLOSED DUPLICATE of bug 1287468
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: ChunYu Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-15 03:45 UTC by David Shaw
Modified: 2016-11-15 16:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-15 06:31:01 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description David 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 David 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.


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