Created attachment 632981 [details] settings to be applied to running kernel Description of problem: after upgrade to systemd-44-20.fc17.x86_64 systemd don't apply the settings specified in /etc/sysctl.d/local.conf Version-Release number of selected component (if applicable): systemd-44-20.fc17.x86_64 How reproducible: always also happens in a kvm virtual machine Steps to Reproduce: 1. put a file with custom settings to be in /etc/systctl.d 2. restart 3. the setting are not applied Actual results: settings arre not applied Expected results: settings applied to the running kernel Additional info: Fedora 17 x86_64
Could you remove the space after the -p in line 666 in /etc/init.d/functions As in change the line from this test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1 To this test -f "$file" && sysctl -e -p"$file" >/dev/null 2>&1 Reboot and see if your file(s) gets read and the changes applied? See... https://gitorious.org/procps/procps/commit/e2987888e27173f1a421e75f582ccfbe6fd5d05e
thanks but changing the line to: test -f "$file" && sysctl -e -p"$file" >/dev/null 2>&1 didn't work I ran the following tests in a virtual machine: current systemd-44-20.fc17.x86_64 current systemd-sysv-44-20.fc17.x86_64 current procps-3.2.8-27.20110302git.fc17.x86_64 apply changes from /etc/sysctl.conf but not from /etc/sysctl.d/* current systemd-44-20.fc17.x86_64 current systemd-sysv-44-20.fc17.x86_64 previous procps-3.2.8-26.20110302git.fc17.x86_64 apply changes from /etc/sysctl.conf but not from /etc/sysctl.d/* previous systemd-44-17.fc17.x86_64 previous systemd-sysv-44-17.fc17.x86_64 current procps-3.2.8-27.20110302git.fc17.x86_64 apply correctly changes in /etc/sysctl.conf and /etc/sysctl.d/*.conf to kernel previous systemd-44-17.fc17.x86_64 previous systemd-sysv-44-17.fc17.x86_64 previous procps-3.2.8-26.20110302git.fc17.x86_64 apply correctly changes in /etc/sysctl.conf and /etc/sysctl.d/*.conf to kernel after that I made a backup of /usr/lib/systemd/systemd-sysctl from systemd-44-17 updated to current systemd-44-20.fc17.x86_64 current systemd-sysv-44-20.fc17.x86_64 current procps-3.2.8-27.20110302git.fc17.x86_64 and replaced the /usr/lib/systemd/systemd-sysctl with the file from the systemd-44-17 and that worked too apply correctly changes in /etc/sysctl.conf and /etc/sysctl.d/*.conf to kernel
Probably this that is causing this http://pkgs.fedoraproject.org/cgit/systemd.git/diff/0521-sysctl-apply-configuration-at-once.patch?h=f17&id=f27ed14f670c5527e69e326bfd41ca859e3394c2 And that's ignoring files in the following directory's or not applying settings from files in those directory's "/etc/sysctl.d","/run/sysctl.d","/usr/local/lib/sysctl.d","/usr/lib/sysctl.d", the rest of the sysctl patches that got apply seem to be error handling...
I see the bug. It's introduced by 0568-sysctl-avoiding-exiting-with-error-on-EEXIST.patch. When we encounter a previously defined key (in this case "net.ipv4.ip_forward"), we skip parsing the rest of the file by mistake.
when running the above tests in the virtual machine I was not testing/seeing the last one setting net.netfilter.nf_conntrack_acct = 1 and using in my real machine the following combination: current systemd-44-20.fc17.x86_64 current systemd-sysv-44-20.fc17.x86_64 current procps-3.2.8-27.20110302git.fc17.x86_64 with /usr/lib/systemd/systemd-sysctl from systemd-44-17.fc17.x86_64 net.ipv4.ip_forward = 1 is applied kernel.shmmax = 134217728 is applied net.netfilter.nf_conntrack_acct = 1 is not applied after booting the machine I can: echo 1 > /proc/sys/net/netfilter/nf_conntrack_acct cat /proc/sys/net/netfilter/nf_conntrack_acct 1
Gabriel, thank you for your reports. We now have sufficient information about the bug.
Upstream fix: http://cgit.freedesktop.org/systemd/systemd/commit/?id=91b32fa987a4a50faf3d8561b28b6c9d5150adef
systemd-44-21.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/systemd-44-21.fc17
(In reply to comment #8) > systemd-44-21.fc17 has been submitted as an update for Fedora 17. > https://admin.fedoraproject.org/updates/systemd-44-21.fc17 I tested it with /etc/sysctl.d/local.conf fixed one issue but another remains net.ipv4.ip_forward = 1 is not applied if I comment out net.ipv4.ip_forward = 0 from /etc/sysctl.conf the setting is applied so seems /etc/sysctl.conf takes precedence over /etc/sysctl.d kernel.shmmax = 134217728 is applied correctly net.netfilter.nf_conntrack_acct = 1 I checked and netfilter is a module so I removed the setting from /etc/sysctl.d/local.conf and put in /etc/modprobe.d and there works
Package systemd-44-21.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-44-21.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-17053/systemd-44-21.fc17 then log in and leave karma (feedback).
(In reply to comment #9) > seems /etc/sysctl.conf takes precedence over /etc/sysctl.d Yes, it does, intentionally. See bug 760254.
(In reply to comment #11) > (In reply to comment #9) > > seems /etc/sysctl.conf takes precedence over /etc/sysctl.d > > Yes, it does, intentionally. See bug 760254. ok, well then, the bug can be changed to fixed, because systemd-44-21.fc17 applies the kernel.shmmax setting thanks
systemd-195-10.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/systemd-195-10.fc18
systemd-195-10.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.