Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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.
Comment by Dave Reisner (falconindy) - Saturday, 10 November 2012, 20:34 GMT
You're meant to edit /etc/sysctl.conf. pacman will not overwrite this file. And in fact, it's what's overriding your own setting in /etc/sysctl.d.

edit: this has nothing to do with systemd -- we used the exact same mechanism in initscripts.
Comment by Anderson Medeiros Gomes (amg1127) - Saturday, 10 November 2012, 21:38 GMT
Was it expected to have /etc/sysctl.conf overriding settings from /etc/sysctl.d? It's strange... I can't figure why my setup was working well until that migration. I left /etc/sysctl.conf untouched and put all sysctl parameters I wanted in a file under /etc/sysctl.d . Unfortunately, I don't have my /etc/rc.local anymore...

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...


Comment by Anderson Medeiros Gomes (amg1127) - Saturday, 10 November 2012, 21:44 GMT
I'm a bit confusing with this migration... Configuration parameter "vm.vfs_cache_pressure" also can't be set with /etc/sysctl.d

------------

# 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
Comment by Dave Reisner (falconindy) - Saturday, 10 November 2012, 22:57 GMT
> Configuration parameter "vm.vfs_cache_pressure" also can't be set with /etc/sysctl.d
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.

Loading...