User story #9706
closedMethod to set sysctl settings
Description
Our goal is to have a standardized way to set sysctl settings (I am actually astonished this has not been requested yet by anybody).
This would be achieved low-level by a generic NCF method to Set sysctl values.
Input:- json hash or array (referencable by getindices)
- sysctl config filename
- class “linux”
- the existence of “/proc/sys” (to only run if the kernel is compiled with sysctl enabled).
- edit /etc/sysctl.conf for each key promising the correct “key = value” line is present
- writing the value using the sysctl (by paths.sysctl) command if not already set (we could query all sysctl settings in one step and store it in an array to speed up parsing)
- 30_generic_methods/sysctl_set.cf
Updated by François ARMAND almost 8 years ago
This would be great :)
Just to be sure: you are working on it?
Updated by Nicolas CHARLES almost 8 years ago
Hi Janos,
Thank you for the ticket.I have several remarks:
- the input format is great, as it's all purpose
- i understand the rational for limiting to linux the generic method, but in the long run, it might be relevant to add *bsd as well
- you mentionned it on IRC, and I don't know if you found a solution, but how will it work with sysctl.d ? shall it create a ncf.conf file, that would override others values (don't know if it's possible?)
Updated by Janos Mattyasovszky almost 8 years ago
ncharles: For now we plan to create an ncf method, that sets sysctl settings in a provided "${sysctl_file}" and on the live system parallel, and a second method, that has this variable default to "/etc/sysctl.conf", so it can be used later for customizing which file you'd want to put it in, and so the reporting could also work (we'd include the sanitized filename in the report).
in the long run somebody who actually has *bsd experience can extend it to also work on *bsd -- this is why open source rocks ;-)
fanf: Feri will be working on it.
Updated by Janos Mattyasovszky almost 8 years ago
I unfortunately cannot edit my original post in the ncf project, so if you could please extend the Input section with "sysctl config filename" ;-)
Updated by Benoît PECCATTE over 7 years ago
- Category set to Generic methods
- Target version set to master
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from master to 4.2.2
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 4.2.2 to 4.2.3
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 4.2.3 to 4.2.4
Updated by Benoît PECCATTE almost 7 years ago
- Target version changed from 4.2.4 to Ideas (not version specific)
Updated by Alexis Mousset over 4 years ago
- Is duplicate of Bug #16882: Generic method sysctl_value added
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category changed from Generic methods to Generic methods