Project

General

Profile

Actions

Bug #16882

closed

Generic method sysctl_value

Added by Nicolas CHARLES about 1 year ago. Updated about 1 year ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
User visibility:
Effort required:
Priority:
0
Tags:

Description

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 -n key, and:
If it success, with the correct value, report a Success (wherever the key is defined)
If its an error, it would add it in the file given as a parameter (creating it if necessary), run sysctl -p, and report a Repaired status

If the key exists, 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 -n to check if the value is set or not (given the precedence of files, it may not be used)
    report based on the return of sysctl -n

Related issues

Has duplicate ncf - User story #9706: Method to set sysctl settingsRejectedActions
Actions #1

Updated by Nicolas CHARLES about 1 year ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #2

Updated by Nicolas CHARLES about 1 year ago

Optionnal parameter are
Min: The Value is only changed/set, if the value is unset or lower than what is provided as input for Generic Method
Max: The Value is only changed/set, if the value is unset or higher than what is provided as input for Generic Method·
Default (default value): The Value is enforced to be what is provided as input for Generic Method

Min and Max will be alphanumerically compared. If comparision fails, it won't change anything and define an "error" state

Actions #4

Updated by Nicolas CHARLES about 1 year ago

  • Assignee changed from Nicolas CHARLES to Félix DALLIDET
  • Pull Request set to https://github.com/Normation/ncf/pull/1153
Actions #5

Updated by Nicolas CHARLES about 1 year ago

  • Status changed from In progress to Pending technical review
Actions #6

Updated by Nicolas CHARLES about 1 year ago

  • Status changed from Pending technical review to Pending release
Actions #10

Updated by Vincent MEMBRÉ about 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.17 and 6.0.5 which were released today.

Actions #11

Updated by Alexis MOUSSET about 1 year ago

Actions

Also available in: Atom PDF