Description of problem: * The sunrpc kernel module exposes the following kernel parameters: ------------------------------------------------------------ /proc/sys/sunrpc/max_resvport /proc/sys/sunrpc/min_resvport /proc/sys/sunrpc/tcp_slot_table_entries /proc/sys/sunrpc/udp_slot_table_entries ------------------------------------------------------------ The sunrpc kernel module is loaded after /etc/sysctl.conf is read. Hence any customisations of the aforementioned kernel parameters are lost by the time the sunrpc kernel modules is loaded. In RHEL 6, the sunrpc kernel module exposes a set of module parameters that allow the parameters to be customized easily by adding a file to /etc/modprobe.d/ or editing /etc/modprobe.conf. This also has the added benefit of consistently applying the module parameter whenever the module is (re)loaded, unlike some workarounds. We need to backport to RHEL 5 the following mainline commit: ------------------------------------------------------------ commit cbf1107126af2950623fafdaa5c9df43ab00f046 Author: Trond Myklebust <Trond.Myklebust> Date: Sun Aug 9 15:06:19 2009 -0400 SUNRPC: convert some sysctls into module parameters Parameters like the minimum reserved port, and the number of slot entries should really be module parameters rather than sysctls. Signed-off-by: Trond Myklebust <Trond.Myklebust> ------------------------------------------------------------ Version-Release number of selected component (if applicable): * RHEL 5.5 * Kernel 2.6.18-194 How reproducible: * Always Regards, Harshula
Created attachment 461072 [details] SUNRPC: convert some sysctls into module parameters
There is a nasty hack to fix this at https://bugzilla.redhat.com/show_bug.cgi?id=189311 the best way to fix this is either make the processing of sysctl.conf more intelligent. but a nice and simple way is to have nfs modules load early in the boot process by dropping a script in /etc/sysconfig/modules/ this will avoid touching init scripts all together, and this file can be part of the nfs rpm's - therefore added and removed as needed. for reference *this method is how kvm kernel modules are loaded in RHEL5 right now* here is a sample of such a script /etc/sysconfig/modules/nfs.sh #!/bin/sh if [ $(grep -c nfs /etc/fstab) -ne 0 ]; then modprobe nfs >/dev/null 2>&1 fi this little script is executed very early in init, before sysctl.conf is loaded. it greps /etc/fstab for nfs entries (granted it will be fooled if you mount /dev/sdXY as /something/nfs for some reason...) and pre-emptively loads nfs (which in turn loads sunrpc). sysctl.conf is loaded thereafter, so the values are applied correctly.
(In reply to comment #3) > but a nice and simple way is to have nfs modules load early in the boot process > by dropping a script in /etc/sysconfig/modules/ sunrpc is a kernel module where it can be removed and re-added. Hence we need to utilise a mechanism where the kernel module parameters are applied anytime it is loaded, even well after boot.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
in kernel-2.6.18-245.el5 You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5 Detailed testing feedback is always welcomed.
The bug is tested on 2.6.18-238.12.1.el5 and 2.6.18-262.el5. 1. Feature not implemented: [root@intel-s3e36-01 ~]# uname -a Linux intel-s3e36-01.rhts.eng.rdu.redhat.com 2.6.18-238.12.1.el5 #1 SMP Sat May 7 20:18:50 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux [root@intel-s3e36-01 ~]# modinfo sunrpc filename: /lib/modules/2.6.18-238.12.1.el5/kernel/net/sunrpc/sunrpc.ko license: GPL srcversion: 4C59CA7104F920ED8BF33FD depends: vermagic: 2.6.18-238.12.1.el5 SMP mod_unload gcc-4.1 module_sig: 883f3504dc5e5c12fa8482a4a8d9cf11275a40a0a0f0254efe18ee32e8cf33218b12331dbac89630a0a1c9a22df13ddf2b319f9a839891619a3a5d0fa 2. On 2.6.18-262.el5 [root@hp-dl360g6-01 ~]# uname -a Linux hp-dl360g6-01.rhts.eng.brq.redhat.com 2.6.18-262.el5 #1 SMP Mon May 16 17:49:03 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux [root@hp-dl360g6-01 ~]# modprobe -r sunrpc [root@hp-dl360g6-01 ~]# grep sunrpc /etc/modprobe.conf options sunrpc min_resvport=110 max_resvport=11000 tcp_slot_table_entries=11 [root@hp-dl360g6-01 ~]# modprobe sunrpc [root@hp-dl360g6-01 ~]# cat /proc/sys/sunrpc/{{max,min}_resvport,{tcp,udp}_slot_table_entries} 11000 110 11 16 [root@hp-dl360g6-01 ~]# sysctl -A | grep rpc sunrpc.max_resvport = 11000 sunrpc.min_resvport = 110 sunrpc.tcp_slot_table_entries = 11 sunrpc.udp_slot_table_entries = 16 ====snip
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-1065.html