Hide Forgot
Description of problem: The nfs-config script should be re-run when service that use variables in /etc/sysconfig/nfs are restarted. How reproducible: 100% Steps to Reproduce: 1. Change RPCGSSDARGS in /etc/sysconfig/nfs 2. system restart rpc-gssd 3. ps ax | grep rpc-gss will show args not set. Additional info: commit c4940fad2a73481cad67732746a4e2bb74e8d32e Author: NeilBrown <neilb> Date: Wed Mar 16 12:18:40 2016 -0400 systemd: ensure nfs-config service is re-run as needed.
Hi Steve, just noticed one problem: after this update merged, the command "systemctl status nfs-config" always return 3 as inactive (dead). [root@hp-dl380pg8-14 ~]# rpm -q nfs-utils nfs-utils-1.3.0-0.21.el7.x86_64 [root@hp-dl380pg8-14 ~]# systemctl restart nfs-config [root@hp-dl380pg8-14 ~]# echo $? 0 [root@hp-dl380pg8-14 ~]# systemctl status nfs-config ● nfs-config.service - Preprocess NFS configuration Loaded: loaded (/usr/lib/systemd/system/nfs-config.service; static; vendor preset: disabled) Active: active (exited) since Fri 2016-05-27 07:02:34 EDT; 9s ago Process: 10603 ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh (code=exited, status=0/SUCCESS) Main PID: 10603 (code=exited, status=0/SUCCESS) May 27 07:02:34 hp-dl380pg8-14.rhts.eng.pek2.redhat.com systemd[1]: Starting Preprocess NFS configuration... May 27 07:02:34 hp-dl380pg8-14.rhts.eng.pek2.redhat.com systemd[1]: Started Preprocess NFS configuration. [root@hp-dl380pg8-14 ~]# echo $? 0 [root@hp-dl380pg8-14 ~]# [root@hp-dl380pg8-14 ~]# [root@hp-dl380pg8-14 ~]# rpm -Uvh nfs-utils-1.3.0-0.25.el7.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:nfs-utils-1:1.3.0-0.25.el7 ################################# [ 50%] Cleaning up / removing... 2:nfs-utils-1:1.3.0-0.21.el7 ################################# [100%] [root@hp-dl380pg8-14 ~]# [root@hp-dl380pg8-14 ~]# rpm -q nfs-utils nfs-utils-1.3.0-0.25.el7.x86_64 [root@hp-dl380pg8-14 ~]# systemctl restart nfs-config [root@hp-dl380pg8-14 ~]# echo $? 0 [root@hp-dl380pg8-14 ~]# systemctl status nfs-config ● nfs-config.service - Preprocess NFS configuration Loaded: loaded (/usr/lib/systemd/system/nfs-config.service; static; vendor preset: disabled) Active: inactive (dead) since Fri 2016-05-27 07:03:10 EDT; 6s ago ^^^^^^^^^^^^^^^^^^^^^^ Process: 10747 ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh (code=exited, status=0/SUCCESS) Main PID: 10747 (code=exited, status=0/SUCCESS) May 27 07:03:10 hp-dl380pg8-14.rhts.eng.pek2.redhat.com systemd[1]: Starting Preprocess NFS configuration... May 27 07:03:10 hp-dl380pg8-14.rhts.eng.pek2.redhat.com systemd[1]: Started Preprocess NFS configuration. [root@hp-dl380pg8-14 ~]# echo $? 3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [root@hp-dl380pg8-14 ~]# And If change back with "RemainAfterExit=yes", everything gets OK again. [root@hp-dl380pg8-14 ~]# cat /usr/lib/systemd/system/nfs-config.service | grep "^RemainAfterExit" RemainAfterExit=no [root@hp-dl380pg8-14 ~]# vi /usr/lib/systemd/system/nfs-config.service [root@hp-dl380pg8-14 ~]# cat /usr/lib/systemd/system/nfs-config.service | grep "^RemainAfterExit" RemainAfterExit=yes [root@hp-dl380pg8-14 ~]# systemctl daemon-reload [root@hp-dl380pg8-14 ~]# systemctl restart nfs-config [root@hp-dl380pg8-14 ~]# systemctl status nfs-config ● nfs-config.service - Preprocess NFS configuration Loaded: loaded (/usr/lib/systemd/system/nfs-config.service; static; vendor preset: disabled) Active: active (exited) since Fri 2016-05-27 07:17:42 EDT; 2s ago Process: 10876 ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh (code=exited, status=0/SUCCESS) Main PID: 10876 (code=exited, status=0/SUCCESS) May 27 07:17:42 hp-dl380pg8-14.rhts.eng.pek2.redhat.com systemd[1]: Starting Preprocess NFS configuration... May 27 07:17:42 hp-dl380pg8-14.rhts.eng.pek2.redhat.com systemd[1]: Started Preprocess NFS configuration. [root@hp-dl380pg8-14 ~]# echo $? 0 [root@hp-dl380pg8-14 ~]#
(In reply to Yongcheng Yang from comment #4) > Hi Steve, just noticed one problem: after this update merged, the command > "systemctl status nfs-config" always return 3 as inactive (dead). > Seems it's the expected action. Read from the man page SYSTEMD.SERVICE(5): RemainAfterExit= Takes a boolean value that specifies whether the service shall be considered active even when all its processes exited. Defaults to no. Previously, nfs-config.service was executed once and remain active after that. While the dependent service (i.e. rpc-gssd.service) which contains "After=nfs-config.service" restarting, as nfs-config is already active, NO nfs-config re-run then. So subsequent changes to the distro-specific files do not take effect. To amend the above shortage, this patch unavoidably need to change the nfs-config.service's STATUS. I will update our test cases accordingly and don't deem it as a bug. Please correct me if I'm wrong.
Move to VERIFIED according to comment 5 and comment 6. And will continue to run the automatic case.
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