Bug 1392317

Summary: System failed to boot with NFS mounts in fstab due to lack of dependencies in rpc-statd.service
Product: Red Hat Enterprise Linux 7 Reporter: Steffen Froemer <sfroemer>
Component: systemdAssignee: systemd-maint
Status: CLOSED CANTFIX QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: ccheney, chunwang, dwysocha, eguan, kwalker, msekleta, mthacker, nparmar, sfroemer, steved, swhiteho, systemd-maint-list, yoyang, zlang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-04 09:45:40 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:
Bug Depends On:    
Bug Blocks: 1298243, 1385242, 1420851, 1466365    

Description Steffen Froemer 2016-11-07 07:57:46 UTC
Description of problem:
When the system has NFS-mounts in /etc/fstab, it will fail to boot.

Version-Release number of selected component (if applicable):
nfs-utils-1.3.0-0.21.el7_2.1.x86_64

How reproducible:


Steps to Reproduce:
1. insert nfs mount to /etc/fstab

nfs-server.example.com:/volume1 /nfs/vol1      nfs     nosuid,vers=3,sec=sys,rw        0 0

2. reboot system


Actual results:
System fail to boot.

Expected results:
The system should boot normally.


Additional info:
Adding 'remote-fs-pre.target' to the After-section in systemd-services-unit will resolve this issue

[Unit]
Description=NFS status monitor for NFSv2/3 locking.
DefaultDependencies=no
Conflicts=umount.target
Requires=nss-lookup.target rpcbind.target
After=network.target nss-lookup.target rpcbind.service remote-fs-pre.target

PartOf=nfs-utils.service

Wants=nfs-config.service
After=nfs-config.service

[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
Type=forking
PIDFile=/var/run/rpc.statd.pid
ExecStart=/usr/sbin/rpc.statd --no-notify $STATDARGS

Comment 1 Yongcheng Yang 2016-11-07 08:42:41 UTC
(In reply to Steffen Froemer from comment #0)

Hi Steffen,

Have you ever tried the "_netdev" option ?

MOUNT(8)
<snip>
_netdev
The  filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).
<snip/>

> Steps to Reproduce:
> 1. insert nfs mount to /etc/fstab
> 
> nfs-server.example.com:/volume1 /nfs/vol1      nfs    
> nosuid,vers=3,sec=sys,rw        0 0

update to try with this:
nfs-server.example.com:/volume1 /nfs/vol1      nfs    _netdev,nosuid,vers=3,sec=sys,rw        0 0
^^^^^^^^

Thanks

Comment 6 Steve Whitehouse 2016-12-09 16:30:11 UTC
Adding devel ack as this should be looked at for 7.4.

It is however marked low priority but on the RPL which is a bit of a contradiction. Mark, do you want us to increase the priority on this one, or should we take it off the RPL?

Comment 7 Mark Thacker 2016-12-09 21:44:36 UTC
Raise the priority. It's a 'fail to boot' situation with two customer cases logged against it. Probably shouldn't be low priority in any case.
I've increased both priority and severity to high since it effects booting a system.

Comment 8 Steve Dickson 2017-01-06 15:08:03 UTC
The problems does not exist with nfs-utils-1.3.0-0.34.el7

Adding 
   rhel7srv:/home/src /home/src nfs nosuid,vers=3,sec=sys,rw 0 0

to /etc/fstab and rebooting worked as expected

Also I'm not sure it makes send to add remote-fs-pre.target
to the rpc-statd.service file since that will cause NFS mounts 
to occur. Those mounts will also cause rpc.statd be started.

what nfs-utils version are you seeing this with?

Comment 23 Michal Sekletar 2017-11-20 14:14:39 UTC
Looking at the logs I don't see any problem wrt dependencies. Mount unit is started after network interface is configured.

Comment 28 Michal Sekletar 2017-12-04 09:45:40 UTC
Customer is no longer able to reproduce the issue and because of that we are unable to obtain further information that would help us to root-cause the issue.