Bug 1418041 - Update nfs-utils to use latest upstream configuration style
Summary: Update nfs-utils to use latest upstream configuration style
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
Milan Navratil
URL:
Whiteboard:
Keywords: FutureFeature, Reproducer
Depends On:
Blocks: 1358333
TreeView+ depends on / blocked
 
Reported: 2017-01-31 16:53 UTC by Scott Mayhew
Modified: 2017-12-12 09:37 UTC (History)
7 users (show)

(edit)
Setting *nfs-utils* configuration options has been centralized in `nfs.conf`

With this update, *nfs-utils* uses configuration centralized in the `nfs.conf` file, which is structured into stanzas for each *nfs-utils* program. Each *nfs-utils* program can read the configuration directly from the file, so you no longer need to use the "systemctl restart nfs-config.service" command, but restart only the specific program. For more information, see the `nfs.conf(5)` manual page.

For compatibility with earlier releases, the older `/etc/sysconfig/nfs` configuration method is still available. However, it is recommended to avoid specifying configuration settings in both the `/etc/sysconfig/nfs` and `/etc/nfs.conf` file.
Clone Of:
(edit)
Last Closed: 2017-08-01 19:48:51 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2233 normal SHIPPED_LIVE nfs-utils bug fix and enhancement update 2017-08-01 18:19:33 UTC

Description Scott Mayhew 2017-01-31 16:53:52 UTC
Description of problem:
Update nfs-utils to the latest upstream version.

Setting of configuration options for nfs-utils is clunky at best in RHEL7.  
- some program options can be set individually in /etc/sysconfig/nfs
- others cannot, and instead have be passed in an argument string via /etc/sysconfig/nfs
- in order for config changes in /etc/sysconfig/nfs to take effect, it's necessary to restart the nfs-config systemd service, which runs a shell script that parses /etc/sysconfig/nfs and dumps the settings in /run/sysconfig/nfs-utils, where they are sourced via the EnvironmentFile option in the systemd service unit files

Upstream nfs-utils has a centralized nfs.conf where almost all of the settings can be specified
- the file is structured into stanzas for each program
- the programs can read their configurations directly from the file (so you do not need to 'systemctl restart nfs-config.service', you just need to restart the program itself)

Having a centralized configuration file will make configuration less error prone, especially for add-on products like High Availability (note that the resource agents would need to change though to take advantage of the new config file).

This would also pave the way for any sys-management inititatives that want to implement configuration management.  Most of the settings can even be changed via git-config if you're so-inclined.

Version-Release number of selected component (if applicable):
nfs-utils-1.3.0-0.33.el7 -> nfs-utils-2.1.1


How reproducible:
Easy

Steps to Reproduce:
1. Apply configuration settings to /etc/nfs.conf
2. Verify that the nfs programs (exportfs, rpc.gssd, lockd, rpc.mountd, nfscltrack, nfsd, rpc.statd, sm-notify) use those settings without requiring additional steps like 'systemctl restart nfs-config.service'
3. Revert the /etc/nfs.conf & apply settings the old way (i.e. vi /etc/sysconfig/nfs && systemctl restart nfs-config.service)
4. Verify that the setings applied the 'old' way still work.

Actual results:

Expected results:
It should be possible to manage nfs configuration settings via either the old way (vi /etc/sysconfig/nfs && systemctl restart nfs-config.service) or via a centralized /etc/nfs.conf.

Additional info:

1. To maintain backward compatibility with existing configurations we'll want to keep the existing systemd unit files and scripts in the current nfs-utils.
2. We will need some additional patches: 
- Allow rpc.mountd & exportfs's state directory to be overridden (I'm working on this now)
- Revamp some of the debug logging.  The various programs in nfs-utils do not use common debug logging code, and therefore debug logging for some of the programs cannot yet be controlled via nfs.conf... most notably rpc.gssd.  It is still possible to enable debug logging via /etc/sysconfig/nfs however (may require a drop-in configuration file for systemd, which can be documented).

Comment 6 Yongcheng Yang 2017-06-28 13:53:45 UTC
Just checked the "Backward compatibility", i.e., when both old and
new configuration exist and are conflict, the settings of old way
(/etc/sysconfig/nfs) will be applied.
--------------------------------------------------
[root@ibm-x3550m3-06 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.48.el7.x86_64
[root@ibm-x3550m3-06 ~]# cat /etc/sysconfig/nfs
RPCNFSDARGS="--port 23456"
[root@ibm-x3550m3-06 ~]# cat /etc/nfs.conf
[nfsd]
port=34567
[root@ibm-x3550m3-06 ~]# systemctl restart nfs-config
[root@ibm-x3550m3-06 ~]# systemctl restart nfs
[root@ibm-x3550m3-06 ~]# rpcinfo -p | grep -w nfs
    100003    3   tcp  23456  nfs
    100003    4   tcp  23456  nfs
    100003    3   udp  23456  nfs
    100003    4   udp  23456  nfs
[root@ibm-x3550m3-06 ~]# 
--------------------------------------------------

However, if we just call the program directly, as it never use the
old way (/etc/sysconfig/nfs) to configure it, and program can use
settings from /etc/nfs.conf directly, it turns out the new way
(/etc/nfs.conf) will be applied.
--------------------------------------------------
[root@ibm-x3550m3-06 ~]# systemctl stop nfs
[root@ibm-x3550m3-06 ~]# rpc.nfsd
[root@ibm-x3550m3-06 ~]# rpcinfo -p | grep -w nfs
    100003    3   tcp  34567  nfs
    100003    4   tcp  34567  nfs
    100003    3   udp  34567  nfs
    100003    4   udp  34567  nfs
[root@ibm-x3550m3-06 ~]# rpc.nfsd 0
[root@ibm-x3550m3-06 ~]# 
--------------------------------------------------

IMO, it is expected since calling program directly will start it by
default settings previously before this modification.  However, seems
we'd better to generate some document to explain it some more.

Comment 12 errata-xmlrpc 2017-08-01 19:48:51 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-2017:2233


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