Bug 1427537

Summary: Atomic NFS Server
Product: Red Hat Enterprise Linux 7 Reporter: Marko Myllynen <myllynen>
Component: rhel-server-atomicAssignee: Colin Walters <walters>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: bbreard, bfields, lfriedma, miabbott, sdodson, smilner, swhiteho, walters
Target Milestone: rcKeywords: Extras, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-ostree-2018.1-2.atomic.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-11 00:07:33 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 Marko Myllynen 2017-02-28 14:33:19 UTC
Description of problem:
This fails:

# systemctl start nfs-server.service

This works:

# touch /var/lib/nfs/etab
# systemctl start nfs-server.service

If it is not supported to run NFS server on Atomic then the related unit files should perhaps be removed. If NFS server is supported on Atomic then it should start up like on RHEL. Either way, the current situation is probably the most confusing one.

If unsupported, it would nice to document this somewhere.

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

Comment 2 Marko Myllynen 2017-02-28 14:41:05 UTC
Actually, on boot I also see this:

[FAILED] Failed to mount RPC Pipe File System.
See 'systemctl status var-lib-nfs-rpc_pipefs.mount' for details.
[DEPEND] Dependency failed for RPC security service for NFS client and server.
[DEPEND] Dependency failed for RPC security service for NFS server.

Comment 3 Colin Walters 2017-02-28 14:42:11 UTC

*** This bug has been marked as a duplicate of bug 1406164 ***

Comment 4 Marko Myllynen 2017-02-28 14:50:15 UTC
No, this is a separate issue, doing after boot:

# systemctl restart var-lib-nfs-rpc_pipefs.mount
# systemctl is-active var-lib-nfs-rpc_pipefs.mount
active
# systemctl start nfs-server.service
A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
# systemctl is-active nfs-server.service
inactive

We see:

atom.example.com rpc.mountd[11168]: couldn't open /var/lib/nfs/etab

But then:

# touch /var/lib/nfs/etab
# systemctl start nfs-server
# systemctl is-active nfs-server.service
active

Thanks.

Comment 5 Ben Breard 2017-08-25 01:34:07 UTC
Colin,

I can verify this is still a problem w/ 7.4. This is similar to the same issue you linked to, but I think we're missing the correct tmpfile config in the nfs-utils rpm. 

This creates the necessary files, but the config file should live in the nfs-utils package and obviously be under /usr/lib/tmpfiles.d/

cat /etc/tmpfiles.d/nfs.conf 
#Type Path         Mode  UID  GID Age Argument
f     /var/lib/nfs/etab 0644  root  root  -  -
f     /var/lib/nfs/rmtab 0644  root  root  -  -
f     /var/lib/nfs/xtab 0644  root  root  -  -

Can we add something to the rpm-ostree compose to touch these files until it's added in the package?

Comment 6 Colin Walters 2018-01-15 15:25:23 UTC
Yeah, we can work around this on the rpm-ostree side.  I may look at doing an nfs-utils patch upstream though.

Comment 7 Colin Walters 2018-02-05 16:07:39 UTC
Things appear to work in Fedora 27 Atomic Host; there's been a lot of changes in upstream nfs-utils in this area.  I didn't fully try to analyze all of them, but I am guessing it's http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=8e98eed42b64aa388c09716e3276a53028a839bf that made things work here.

I think though it's not going to hurt to just always add the etab/mtab to our tmpfiles.d set in rpm-ostree.

Comment 12 errata-xmlrpc 2018-04-11 00:07:33 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://access.redhat.com/errata/RHBA-2018:1095