Project

General

Profile

Bug #16882

Generic method sysctl_value

Added by Nicolas CHARLES 3 months ago. Updated about 1 month 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
#1

Updated by Nicolas CHARLES 3 months ago

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

Updated by Nicolas CHARLES 3 months 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

#4

Updated by Nicolas CHARLES 3 months ago

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

Updated by Nicolas CHARLES 3 months ago

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

Updated by Nicolas CHARLES 3 months ago

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

Updated by Vincent MEMBRÉ about 1 month 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.

#11

Updated by Alexis MOUSSET about 1 month ago

Also available in: Atom PDF