The sub-config files located in the folder '/etc/sysctl.d' are not being loaded on bootup. See below for example. <after bootup> [root@desktop ~]# cat /etc/sysctl.d/libvirtd |grep -v ^# fs.aio-max-nr = 1048576 [root@desktop ~]# cat /etc/sysctl.d/postgresql kernel.shmmax=446668800 [root@desktop ~]# sysctl -a |grep fs.aio-max-nr fs.aio-max-nr = 65536 [root@desktop ~]# sysctl -a |grep kernel.shmmax kernel.shmmax = 33554432 As you can see, the values are not proper after the system boots. If i manually set the values to the desired setting via the sysctl utility from the CLI, then all is well. Version is Fedora 18 Beta with current patch level as of today (12/13/2012). see below for actually version number of initscripts.... [root@desktop ~]# rpm -qf /etc/sysctl.conf initscripts-9.42.1-1.fc18.x86_64
See 'man sysctl.d' - files should end with '.conf'.
Ah, yes... I guess i should file this under the *libvirt-daemon* package then. The libvirtd file under the /etc/sysctl.d directory (in the libvirt-daemon pacakge) does not have the .conf extension and it's settings are not being applied. # rpm -qf /etc/sysctl.d/libvirtd libvirt-daemon-0.10.2.2-1.fc18.x86_64 # cat /etc/sysctl.d/libvirtd |grep -v ^# fs.aio-max-nr = 1048576 #
Reading that man page, it sounds like libvirt should be installing into /usr/lib/sysctl.d/libvirt.conf, not /etc/sysctl.d/ - so it is more than just a wrong suffix, but a wrong location.
/etc will work, but /usr/lib/sysctl.d is preferred for system-distributed configurations.
I guess that just leaves the matter of adding the proper '.conf' suffix to the file then.
In the spec file, how does one guarantee that the file will be installed into /usr/lib/sysctl.d, even when %{_libdir} is /usr/lib64?
/usr/lib/<pkgname>/ has nothing to do with %{_libdir} or multi-lib. It is always: %{_prefix}/lib/<pkgname> and treated as the "application private directory" which is the same for all architectures and systems. %{_libdir} is for shared libraries and almost nothing else.
Upstream patch proposed: https://www.redhat.com/archives/libvir-list/2013-January/msg00223.html
This commit addresses the bug, and the three commits beforehand are probably also worth pulling into F18. I'll go ahead and do the backport work for the v0.10.2-maint branch. commit a1fd56cb3057c45cffbf5d41eaf70a26d2116b20 Author: Eric Blake <eblake> Date: Fri Jan 4 14:21:59 2013 -0700 build: install libvirt sysctl file correctly https://bugzilla.redhat.com/show_bug.cgi?id=887017 reports that even though libvirt attempts to set fs.aio-max-nr via sysctl, the file was installed with the wrong name and gets ignored by sysctl. Furthermore, 'man systcl.d' recommends that packages install into hard-coded /usr/lib/sysctl.d (even when libdir is /usr/lib64), so that sysadmins can use /etc/sysctl.d for overrides. * daemon/Makefile.am (install-sysctl, uninstall-sysctl): Use correct location. * libvirt.spec.in (network_files): Reflect this.
*** Bug 896149 has been marked as a duplicate of this bug. ***
*** Bug 902552 has been marked as a duplicate of this bug. ***
libvirt-0.10.2.3-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/libvirt-0.10.2.3-1.fc18
I can confirm issue is fixed in libvirt-daemon-0.10.2.3-1.fc18. File is /usr/lib/sysctl.d/libvirtd.conf and gets successfully processed by systemd-sysctl.service # systemctl restart systemd-sysctl.service # sysctl -a|grep fs.aio fs.aio-max-nr = 1048576 fs.aio-nr = 0
libvirt-0.10.2.3-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.