redhat-performance / tuned

Tuning Profile Delivery Mechanism for Linux
GNU General Public License v2.0
804 stars 177 forks source link

plugin_sysctl.py: sysctl configs apply order #409

Open alexeyantropov opened 2 years ago

alexeyantropov commented 2 years ago

This block https://github.com/redhat-performance/tuned/blob/master/tuned/plugins/plugin_sysctl.py#L119-L123 applies configuration files in an unexpected order. At the first it applies override values from the sysctl.d drop-in directory, and at the last it applies values from main sysctl.conf config.

I reckon it's wrong. In the general case sysctl.conf has only default values and files from sysctl.d/*.conf have some custom values. However tuned (re)start breaks this drop-in approach and custom values are rewritten by the default values from the main config.

For example, it could be net.ipv4.ip_forward=1 in /etc/sysctl.d/foo.conf and net.ipv4.ip_forward=0 in /etc/sysctl.conf for virtualization systems like lxc, docker, kvm. After tuned (re)start virtual machines will be lost.

alexeyantropov commented 2 years ago

Ping?

alexeyantropov commented 1 year ago

Hello there! How about this issue? Is anybody alive here?

yarda commented 1 year ago

Although I think it's systemd fault and other tools, especially sysctl, which we took as the standard for the implementation, do it the same way, we will probably add some workaround for it.

There is downstream Red Hat bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2213614

alexeyantropov commented 1 year ago

Thx for the answer, got it