Project

General

Profile

Actions

User story #9706

closed

Method to set sysctl settings

Added by Janos Mattyasovszky over 7 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Generic methods
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

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
Sanity checks:
  • class “linux”
  • the existence of “/proc/sys” (to only run if the kernel is compiled with sysctl enabled).
Actions:
  • 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)
Filename:
  • 30_generic_methods/sysctl_set.cf

Related issues 1 (0 open1 closed)

Is duplicate of Rudder - Bug #16882: Generic method sysctl_valueReleasedFélix DALLIDETActions
Actions #1

Updated by François ARMAND over 7 years ago

This would be great :)
Just to be sure: you are working on it?

Actions #2

Updated by Nicolas CHARLES over 7 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?)
Actions #3

Updated by Janos Mattyasovszky over 7 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.

Actions #4

Updated by Janos Mattyasovszky over 7 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" ;-)

Actions #5

Updated by Nicolas CHARLES over 7 years ago

  • Description updated (diff)

Message edited !

Actions #6

Updated by Benoît PECCATTE about 7 years ago

  • Category set to Generic methods
  • Target version set to master
Actions #7

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from master to 4.2.2
Actions #8

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.2.2 to 4.2.3
Actions #9

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.2.3 to 4.2.4
Actions #10

Updated by Benoît PECCATTE about 6 years ago

  • Target version changed from 4.2.4 to Ideas (not version specific)
Actions #11

Updated by Alexis Mousset almost 4 years ago

  • Status changed from New to Rejected
Actions #12

Updated by Alexis Mousset almost 4 years ago

  • Is duplicate of Bug #16882: Generic method sysctl_value added
Actions #13

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods to Generic methods
Actions

Also available in: Atom PDF