[rudder-users] suggestion add sysctl settings to directive library

Nicolas Charles nicolas.charles at rudder.io
Wed Nov 20 12:12:05 CET 2019


Hi Tim,

Thank you for your message - we've been considering creating a Generic 
Method to manage sysctl values, that would be call sysctl_value, and 
take 3 parameters:

- the key

- the value,

- the file name where to put the value in /etc/sysctl.d

It would check the keys/value running sysctl -a, and:

 1. If the key exists, with the correct value, report a Success
    (wherever the key is defined)
 2. If the key does not exist in the output of sysctl -a, it would add
    it in the file given as a parameter (creating it if necessary), run
    sysctl -p, and eport a Repaired status
 3. If the key exists in the output of sysctl -a, with the incorrect
    value, it would
     1. create the correct key/value in the file given as a parameter
     2. run sysctl -p
     3. run sysctl -a to check if the value is set or not (given the
        precedence of files, it may not be used)
     4. report based on the return of sysctl -a


What do you think of this ?

Do you think it is also important to have a Technique to manage sysctl ?

Regards,

Nicolas CHARLES

On 19/11/2019 21:12, tim taler wrote:
> Hi all,
>
> I wonder why there is not a ready made directive to set sysctl
> settings in rudder.
>
> We used to have several tuning settings for sysctl (like swappiness,
> dirty_ratio and other)
>
> I created a simple user technique for it:
> a "File key-value present" promise
> and a sysctl -p command execution on the condition that the above
> promise was repaired.
> having "key" and "value" in a parameter I can instantiate a directive
> for various key-value pairs
>
> I just wondered why this is not already included in the directives,
> since sysctl settings are IMO quite common.
>
> best regards
>
> _______________________________________________
> rudder-users mailing list
> FAQ: https://faq.rudder.io/
> Bug Tracker: https://issues.rudder.io/
> rudder-users at lists.rudder-project.org
> https://www.rudder-project.org/mailman/listinfo/rudder-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20191120/76305f9e/attachment.htm>


More information about the rudder-users mailing list