Bug 1316701 - RPCNFSDCOUNT value in /etc/sysconfig/nfs has no affect
Summary: RPCNFSDCOUNT value in /etc/sysconfig/nfs has no affect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-10 20:40 UTC by Andy Wang
Modified: 2016-04-05 14:18 UTC (History)
5 users (show)

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
Clone Of:
Environment:
Last Closed: 2016-03-22 19:52:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andy Wang 2016-03-10 20:40:19 UTC
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 21:34:53 UTC
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 22:38:40 UTC
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 14:00:11 UTC
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 18:29:53 UTC
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 15:09:25 UTC
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 09:22:46 UTC
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 15:06:36 UTC
The upstream commit:

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 8 Fedora Update System 2016-03-20 21:19:49 UTC
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 21:19:52 UTC
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 22:31:56 UTC
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 19:52:19 UTC
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 17:56:53 UTC
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 14:18:44 UTC
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.