Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1331460

Summary: nfs-config service is *not* being re-run as needed
Product: Red Hat Enterprise Linux 7 Reporter: Steve Dickson <steved>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: eguan, fs-qe, jiyin, steved, yoyang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs-utils-1.3.0-0.25.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:03:35 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 Steve Dickson 2016-04-28 14:50:39 UTC
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.

Comment 4 Yongcheng Yang 2016-05-27 11:30:36 UTC
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 ~]#

Comment 5 Yongcheng Yang 2016-05-31 03:02:49 UTC
(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.

Comment 7 Yongcheng Yang 2016-05-31 03:16:12 UTC
Move to VERIFIED according to comment 5 and comment 6.
And will continue to run the automatic case.

Comment 9 errata-xmlrpc 2016-11-04 05:03:35 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://rhn.redhat.com/errata/RHBA-2016-2383.html