FS#32582 - After systemd migration, I'm unable to enable IPv4 packet forwarding at boot time...
Attached to Project:
Arch Linux
Opened by Anderson Medeiros Gomes (amg1127) - Saturday, 10 November 2012, 19:06 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 11 November 2012, 02:59 GMT
Opened by Anderson Medeiros Gomes (amg1127) - Saturday, 10 November 2012, 19:06 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 11 November 2012, 02:59 GMT
|
Details
Description:
After systemd migration ( https://wiki.archlinux.org/index.php/Systemd ) , I'm unable to enable IPv4 packet forwarding at boot time with a file left in /etc/sysctl.d . I could define net.ipv4.ip_forward=1 if I manually edited /etc/sysctl.conf, but this file is owned by procps-ng package and I would have to keep track of changes during package upgrading. I have systemd 195-2 and procps-ng 3.3.5-1 installed. Steps to reproduce: # echo 'net.ipv4.ip_forward=1' > /etc/sysctl.d/zz-enable-ip-forwarding.conf # reboot # cat /proc/sys/net/ipv4/ip_forward |
This task depends upon
Closed by Dave Reisner (falconindy)
Sunday, 11 November 2012, 02:59 GMT
Reason for closing: Works for me
Additional comments about closing: Feel free to open a bug about moving procps-ng's sysctl.conf file.
Sunday, 11 November 2012, 02:59 GMT
Reason for closing: Works for me
Additional comments about closing: Feel free to open a bug about moving procps-ng's sysctl.conf file.
edit: this has nothing to do with systemd -- we used the exact same mechanism in initscripts.
I know pacman will not overwrite the file when it changes. But after a new procps-ng upgrade, I must merge configuration changes provided by the package manager with the ones I did locally. I wanted to avoid this job.
It's sure the right way to override settings from /etc/sysctl.conf is the manual editing? If it is, the file /etc/sysctl.conf from procps-ng should be moved to /usr/lib/sysctl.d/procps-ng.conf...
------------
# grep pressure /etc/sysctl.d/*.conf \
> /run/sysctl.d/*.conf \
> /usr/lib/sysctl.d/*.conf \
> /etc/sysctl.conf
/etc/sysctl.d/99-configuracoes-amg1127.conf:vm.vfs_cache_pressure = 150
grep: /run/sysctl.d/*.conf: No such file or directory
grep: /usr/lib/sysctl.d/*.conf: No such file or directory
/etc/sysctl.conf:#vm.vfs_cache_pressure = 100
# echo 50 > /proc/sys/vm/vfs_cache_pressure
# /usr/lib/systemd/systemd-sysctl
# cat /proc/sys/vm/vfs_cache_pressure
50
Yes, it can. This all works. Order of precendence (highest first) is: /etc/sysctl.conf > /etc/sysctl.d/*.conf > /run/sysctl.d/*.conf > /usr/local/lib/sysctl.d/*.conf > /usr/lib/sysctl.d/*.conf
# echo 'vm.vfs_cache_pressure = 142' >/etc/sysctl.d/99-configuracoes-amg1127.conf
# reboot
....
# cat /proc/sys/vm/vfs_cache_pressure
142
> If it is, the file /etc/sysctl.conf from procps-ng should be moved to /usr/lib/sysctl.d/procps-ng.conf
Probably. Feel free to open a new bug. It isn't related to the non-bug here.