Bug 1380137

Summary: When /var is a separate filesystem, nfs-server.service fails if export is iscsi based
Product: Red Hat Enterprise Linux 7 Reporter: John Pittman <jpittman>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED CURRENTRELEASE QA Contact: Yongcheng Yang <yoyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: dwysocha, jpittman, steved, swhiteho, xzhou, yoyang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-18 17:37:00 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, 1477664, 1546181    

Description John Pittman 2016-09-28 18:09:24 UTC
Description of problem:

When /var is a separate filesystem, nfs-server.service fails if export is iscsi based.  Issue does not happen if /var is located on the same filesystem as root.

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

kernel-3.10.0-327.36.1.el7.x86_64
systemd-219-19.el7_2.13.x86_64
nfs-utils-1.3.0-0.21.el7_2.1.x86_64

How reproducible:

- Install system where /var is separate filesystem from /
- Connect to iscsi target, create logical volume, ext4 fs on dev
- Add fs to /etc/fstab
- Add mount point to /etc/exports
- Ensure nfs-server.service is set to start at boot
- Reboot

Actual results:

nfs-server.service will fail to start

Expected results:

nfs-server.service should not fail to start

Additional info:

Issue can be worked around by adding the below to /lib/systemd/system/nfs-server.service

RequiresMountsFor=<mount-point>

During troubleshooting, to the nfs-server.service file in the [Unit] section I tried adding After=iscsid.service and After=lvm2-pvscan@.service.  Neither of these worked around the issue.

Comment 4 Steve Whitehouse 2016-12-09 16:08:18 UTC
So this looks like a boot ordering issue. What is the correct solution here? Is it just a matter of documenting how to set the dependencies such that the NFS export will not be attempted until the exported fs is available, or is there actually a change that we need to avoid the problem in the first place?

I'd prefer the latter if it is possible, but not quite sure what systemd will be able to express dependency-wise.

Setting devel cond nack for the time being, but please update if that is not correct.

Comment 8 Steve Dickson 2018-04-17 13:51:37 UTC
What is the error causing the server not to come up?

Comment 9 John Pittman 2018-04-18 16:09:58 UTC
I can no longer reproduce this issue at the latest levels.

kernel-3.10.0-862.el7.x86_64
iscsi-initiator-utils-6.2.0.874-7.el7.x86_64
nfs-utils-1.3.0-0.54.el7.x86_64

Comment 10 Steve Dickson 2018-04-18 17:37:00 UTC
(In reply to John Pittman from comment #9)
> I can no longer reproduce this issue at the latest levels.
> 
> kernel-3.10.0-862.el7.x86_64
> iscsi-initiator-utils-6.2.0.874-7.el7.x86_64
> nfs-utils-1.3.0-0.54.el7.x86_64

Ok... I'm going close the bug for now... if the 
problem pops back up... Please feel free to reopen