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 1287468 - Unable to start nfs server.service if any of the client is down and dns unable to resolve the client name
Summary: Unable to start nfs server.service if any of the client is down and dns unabl...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.2
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
: 1314200 1395062 (view as bug list)
Depends On:
Blocks: 1203710 1295577 1313485
TreeView+ depends on / blocked
 
Reported: 2015-12-02 07:41 UTC by Rinku
Modified: 2020-11-07 05:33 UTC (History)
8 users (show)

Fixed In Version: nfs-utils-1.3.0-0.24.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 05:02:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1340788 0 unspecified CLOSED [exportfs] should not fail on empty exports file with "No file systems exported" 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 5545331 0 None None None 2020-11-07 05:33:09 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: 1340788

Comment 4 Steve Dickson 2016-01-16 17:32:36 UTC
The two needed upstream commits:

commit 076dd803330d93819c6e7862f515a8fa3997a83b
Author: Henrique Martins <linux>
Date:   Tue Nov 4 15:12:16 2014 -0500

    exportfs: changes handling of unresolvable entries

commit 612581573ba104404b86242ca35c2ff35abd5e72
Author: Rinku Kothiya <rkothiya>
Date:   Sat Jan 16 12:19:40 2016 -0500

    Set right error after getaddrinfo fails

Comment 5 Yongcheng Yang 2016-02-15 03:01:14 UTC
Reproduced in latest RHEL-7.2 with nfs-utils-1.3.0-0.21.el7.
Will generate automatic case later.

[root@hp-dl380pg8-01 ~]# cat /etc/exports
/export_test   *(rw,sync,no_root_squash)
/mnt    non-exist.com(rw,sync,no_root_squash)
[root@hp-dl380pg8-01 ~]# service nfs restart
Redirecting to /bin/systemctl restart  nfs.service
Job for nfs-server.service failed because the control process exited with error code. See "systemctl status nfs-server.service" and "journalctl -xe" for details.
[root@hp-dl380pg8-01 ~]# echo $?
1
[root@hp-dl380pg8-01 ~]# service nfs status -l
Redirecting to /bin/systemctl status  -l nfs.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2016-02-15 10:58:22 CST; 40s ago
  Process: 15403 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
  Process: 15400 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
  Process: 15398 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
  Process: 15223 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 15443 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
 Main PID: 15223 (code=exited, status=0/SUCCESS)

Feb 15 10:58:22 hp-dl380pg8-01.rhts.eng.pek2.redhat.com systemd[1]: Starting NFS server and services...
Feb 15 10:58:22 hp-dl380pg8-01.rhts.eng.pek2.redhat.com exportfs[15443]: exportfs: Failed to resolve non-exist.com
Feb 15 10:58:22 hp-dl380pg8-01.rhts.eng.pek2.redhat.com exportfs[15443]: exportfs: Failed to resolve non-exist.com
Feb 15 10:58:22 hp-dl380pg8-01.rhts.eng.pek2.redhat.com systemd[1]: nfs-server.service: control process exited, code=exited status=1
Feb 15 10:58:22 hp-dl380pg8-01.rhts.eng.pek2.redhat.com systemd[1]: Failed to start NFS server and services.
Feb 15 10:58:22 hp-dl380pg8-01.rhts.eng.pek2.redhat.com systemd[1]: Unit nfs-server.service entered failed state.
Feb 15 10:58:22 hp-dl380pg8-01.rhts.eng.pek2.redhat.com systemd[1]: nfs-server.service failed.
[root@hp-dl380pg8-01 ~]# exportfs -v
/export_test  	<world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)
[root@hp-dl380pg8-01 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.21.el7.x86_64
[root@hp-dl380pg8-01 ~]#

Comment 7 Steve Dickson 2016-04-26 18:39:51 UTC
*** Bug 1314200 has been marked as a duplicate of this bug. ***

Comment 10 Yongcheng Yang 2016-05-17 07:15:38 UTC
Move to VERIFIED according to comment 9.

Will continue to run the automatic case in the future.

Comment 11 Yongcheng Yang 2016-05-30 09:52:40 UTC
(In reply to Steve Dickson from comment #4)
> The two needed upstream commits:
> 
> commit 076dd803330d93819c6e7862f515a8fa3997a83b
> Author: Henrique Martins <linux>
> Date:   Tue Nov 4 15:12:16 2014 -0500
> 
>     exportfs: changes handling of unresolvable entries
> 

Please NOTE this patch has introduced a regression.

Already filed Bug 1340788 to trace it and will keep this one as VERIFIED.

Just list the  description of this regression following:

Previously if there is nothing to export and execute "exportfs -a/-r", the Return Code is 0. But now it will emit an ERROR and return 1.

Previously with nfs-utils-1.3.0-0.21.el7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[root@hp-dl385pg8-08 ~]# ls /etc/exports.d/
[root@hp-dl385pg8-08 ~]# cat /etc/exports
[root@hp-dl385pg8-08 ~]# exportfs -a
[root@hp-dl385pg8-08 ~]# echo $?
0
[root@hp-dl385pg8-08 ~]# exportfs -r
[root@hp-dl385pg8-08 ~]# echo $?
0
[root@hp-dl385pg8-08 ~]# exportfs -v
[root@hp-dl385pg8-08 ~]# 
[root@hp-dl385pg8-08 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.21.el7.x86_64
[root@hp-dl385pg8-08 ~]# 

But now, with this version nfs-utils-1.3.0-0.24.el7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[root@hp-dl385pg8-08 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.24.el7.x86_64
[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 ~]# exportfs -v
[root@hp-dl385pg8-08 ~]# 

And what's even worse, it return this ERROR even if
using extra export.d files to export:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[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 ~]#

Comment 13 errata-xmlrpc 2016-11-04 05:02: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

Comment 14 Yongcheng Yang 2016-11-15 06:31:01 UTC
*** Bug 1395062 has been marked as a duplicate of this bug. ***


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