Project

General

Profile

Actions

Bug #16882

closed

Generic method sysctl_value

Added by Nicolas CHARLES over 4 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:

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 1 (0 open1 closed)

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

Updated by Nicolas CHARLES over 4 years ago

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

Updated by Nicolas CHARLES over 4 years 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 over 4 years 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 over 4 years ago

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

Updated by Nicolas CHARLES over 4 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:5ab77255e85bbeec24bd64313450f3b2b236ae22.

Actions #7

Updated by Nicolas CHARLES over 4 years ago

Applied in changeset commit:6a8a5bcb9123cdcdec3bfb9821857e2637619b35.

Actions #8

Updated by Nicolas CHARLES over 4 years ago

  • Fix check changed from To do to Checked
Actions #9

Updated by Alexis Mousset over 4 years ago

  • Name check changed from To do to Reviewed
Actions #10

Updated by Vincent MEMBRÉ over 4 years 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 over 4 years ago

Actions #12

Updated by Alexis Mousset over 2 years ago

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

Also available in: Atom PDF