<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Tim,</p>
    <p>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:</p>
    <p>- the key</p>
    <p>- the value,</p>
    <p>- the file name where to put the value in /etc/sysctl.d</p>
    <p>It would check the keys/value running sysctl -a, and:</p>
    <ol>
      <li>If the key exists, with the correct value, report a Success
        (wherever the key is defined)</li>
      <li>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<br>
      </li>
      <li>If the key exists in the output of sysctl -a, with the
        incorrect value, it would</li>
      <ol>
        <li>create the correct key/value in the file given as a
          parameter</li>
        <li>run sysctl -p</li>
        <li>run sysctl -a to check if the value is set or not (given the
          precedence of files, it may not be used)</li>
        <li>report based on the return of sysctl -a</li>
      </ol>
    </ol>
    <p><br>
    </p>
    <p>What do you think of this ? <br>
    </p>
    <p>Do you think it is also important to have a Technique to manage
      sysctl ?</p>
    <p>Regards,<br>
    </p>
    <div class="moz-signature">Nicolas CHARLES</div>
    <div class="moz-signature"><br>
    </div>
    <div class="moz-cite-prefix">On 19/11/2019 21:12, tim taler wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+=NtHz4TLXqa1K0pWgNs4qHMwx0V6Cw5uM-aKmNwY+L7hH5Qg@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">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: <a class="moz-txt-link-freetext" href="https://faq.rudder.io/">https://faq.rudder.io/</a>
Bug Tracker: <a class="moz-txt-link-freetext" href="https://issues.rudder.io/">https://issues.rudder.io/</a>
<a class="moz-txt-link-abbreviated" href="mailto:rudder-users@lists.rudder-project.org">rudder-users@lists.rudder-project.org</a>
<a class="moz-txt-link-freetext" href="https://www.rudder-project.org/mailman/listinfo/rudder-users">https://www.rudder-project.org/mailman/listinfo/rudder-users</a>
</pre>
    </blockquote>
  </body>
</html>