Bug 1316701 - RPCNFSDCOUNT value in /etc/sysconfig/nfs has no affect
RPCNFSDCOUNT value in /etc/sysconfig/nfs has no affect
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: nfs-utils (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Steve Dickson
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-10 15:40 EST by Andy Wang
Modified: 2016-04-05 10:18 EDT (History)
5 users (show)

See Also:
Fixed In Version: nfs-utils-1.3.3-7.rc4.fc23 nfs-utils-1.3.3-7.rc4.fc24 nfs-utils-1.3.3-7.rc4.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-22 15:52:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andy Wang 2016-03-10 15:40:19 EST
Description of problem:
Modifying the RPCNFSDSCOUNT variable (and uncommenting it) in /etc/sysconfig/nfs has no affect.
The man page for rpc.nfsd shows nproc as an argument and the systemd unit has:
ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS

But adding the argument to RPCNFSDARGS instead of RPCNFSDCOUNT also has no affect.

There was a previous bug #870143 that reported a somewhat related issue but it appears the fix for that was to remove RPCNFSDCOUNT from the ExecStart?

There appears to be no way within the service itself to set the number of threads to anything but 8.

# fgrep RPCNFSDCOUNT /etc/sysconfig/nfs
RPCNFSDCOUNT=16
# systemctl stop nfs
# systemctl start nfs
# cat /proc/fs/nfsd/threads
8
# fgrep RPCNFSDARGS /etc/sysconfig/nfs
RPCNFSDARGS="16"
# systemctl stop nfs
# systemctl start nfs
# cat /proc/fs/nfsd/threads
8
Comment 1 J. Bruce Fields 2016-03-10 16:34:53 EST
You also need to "systemctl restart nfs-config".

That's documented at the top of "/etc/sysconfig/nfs", which is probably the right place.

I don't know, maybe some rearrangement of the systemd units could make that "systemctl restart nfs-config" unnecessary....
Comment 2 Andy Wang 2016-03-10 17:38:40 EST
ugh.  RTFM!!  I'm sorry, I totally missed that.  I didn't expect there to need to be an intermediate step.  I even googled this while I was playing with it and didn't see anyone suggest that either. 

Yes, a rearrangement of the systemd units to not require this would be really nice, but duh!!

Sorry for the noise.
Comment 3 J. Bruce Fields 2016-03-11 09:00:11 EST
OK, closing the bug, but if somebody things of a trick to avoid the need for this step, maybe we should reopen to track that work.
Comment 4 Benjamin Coddington 2016-03-11 13:29:53 EST
Can't we just use
ExecStartPre=/usr/lib/systemd/scripts/nfs-utils_env.sh

in all the nfs*.service unit configurations, and get rid of nfs-config service altogether?  Maybe ExecStartPre happens after EnvironmentFile is loaded..  let me test..

..

Seems to work -- adding the ExecStartPre= for nfs-server.service causes the changes in /etc/sysconfig/nfs to take immediate effect..
Comment 5 Benjamin Coddington 2016-03-14 11:09:25 EDT
I think this is worth doing as this will continue to catch users transitioning to a systemd-ed nfs-utils, so I've posted a patch which seems to work, but it will also require modifications to each distro's /usr/lib/systemd/scripts/nfs-utils_env.sh scripts:

http://marc.info/?l=linux-nfs&m=145778435317100&w=2

I'm going to re-open this bug to track this work.
Comment 6 Benjamin Coddington 2016-03-16 05:22:46 EDT
Neil Brown found a better way to fix this:

http://marc.info/?l=linux-nfs&m=145809208206677&w=2
Comment 7 Steve Dickson 2016-03-17 11:06:36 EDT
The upstream commit:

commit c4940fad2a73481cad67732746a4e2bb74e8d32e
Author: NeilBrown <neilb@suse.com>
Date:   Wed Mar 16 12:18:40 2016 -0400

    systemd: ensure nfs-config service is re-run as needed.
Comment 8 Fedora Update System 2016-03-20 17:19:49 EDT
nfs-utils-1.3.3-7.rc4.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-428db89196
Comment 9 Fedora Update System 2016-03-20 17:19:52 EDT
nfs-utils-1.3.3-7.rc4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b4b42c9157
Comment 10 Fedora Update System 2016-03-21 18:31:56 EDT
nfs-utils-1.3.3-7.rc4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7c0d23d470
Comment 11 Fedora Update System 2016-03-22 15:52:19 EDT
nfs-utils-1.3.3-7.rc4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-03-26 13:56:53 EDT
nfs-utils-1.3.3-7.rc4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2016-04-05 10:18:44 EDT
nfs-utils-1.3.3-7.rc4.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

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