Project

General

Profile

Actions

Bug #27892

open

“Sysctl value” generic method with “max” option improperly behaves in Rudder 9.0

Bug #27892: “Sysctl value” generic method with “max” option improperly behaves in Rudder 9.0

Added by Michel BOUISSOU 23 days ago. Updated 6 days ago.

Status:
Pending release
Priority:
1 (highest)
Category:
Generic methods
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
Yes

Description

When the “Sysctl value” generic method is used with “max” option, it is supposed to :
- Produce an action ONLY if the current value of the kernel parameter is greater tha the “max” value provided.

It appears to not work as expected :

- Given that : kernel.printk_ratelimit = 5
- A technique si created, stating that : kernel.printk_ratelimit “max” value should be 10.

Rudder agent run shows that everything is “compliant”, so no change is expected to be made.
Howevere changes ARE made :
- The value of the parameters in the runing kernel is changed (and brought to the MAX value event though is was below it).
- The parameter file in /etc/sysctl.d is created.

- Futhermore :
- Is is the same behaviour whether the option is specified as “max” or ”Max”, both being accepted ;
- There is a discrepancy in the generic method legend, that states “Min” or “Max”, 1st letter in capitals,
- And the generic method's integrated documentation, that shohw all lowercase "min” and ”max”.

root@mboAgent1:/etc/sysctl.d# rm 99_rudder.conf 
root@mboAgent1:/etc/sysctl.d# sysctl kernel.printk_ratelimit=5
kernel.printk_ratelimit = 5

root@mboAgent1:/etc/sysctl.d# sysctl kernel.printk_ratelimit
kernel.printk_ratelimit = 5

root@mboAgent1:/etc/sysctl.d# rudder agent run
Rudder agent 9.0.0
Node uuid: 8582d4b8-8fb8-456c-8b8c-1e0fb3d106c9
ok: Rudder agent policies were updated.
Start execution with config [20251114-134950-2e64eb7]

M| State         Technique                 Component                 Key                Message
E| compliant     Common                    ncf Initialization                           Configuration library initialization was correct
E| repaired      Common                    Update                                       Policy or configuration library were updated
E| repaired      Common                    Security parameters                          Some internal security parameters were adjusted
[...]
E| compliant     syctl_technique_2___spec| 10 - kernel.printk_ratel| kernel.printk_rat| Set the string sysctl_var.checkkernel_printk_ratelimit to the output of '/sbin/sysctl -n kernel.printk_ratelimit # Check value (expect 10, option Max)'  was correct
E| compliant     syctl_technique_2___spec| 10 - kernel.printk_ratel| kernel.printk_rat| Set sysctl value for key kernel.printk_ratelimit, using file 99_rudder with option Max  was correct
E| compliant     sysctl_technique_1        10 - vm.swappiness=0 in | /etc/sysctl.conf   Ensure line in format key=value in /etc/sysctl.conf  was correct
E| compliant     userManagement            User default shell        michel             User michel shell set to /bin/bash  was correct
E| compliant     userGroupManagement       Users                     michel             The user michel ( Without any defined full name ) is already present on the system

## Summary #####################################################################
28 components verified in 10 directives
   => 28 components in Enforce mode
      -> 14 compliant
      -> 2 repaired
      -> 12 not-applicable
Execution time: 2.01s
################################################################################
Reports sent.
root@mboAgent1:/etc/sysctl.d# sysctl kernel.printk_ratelimit
kernel.printk_ratelimit = 10
root@mboAgent1:/etc/sysctl.d# cat 99_rudder.conf 
kernel.printk_ratelimit=10

Files

sysctl_technique_251114a.png (84.5 KB) sysctl_technique_251114a.png Technique, option lowercase Michel BOUISSOU, 2025-11-14 15:02
sysctl_agent_run_251114a.png (149 KB) sysctl_agent_run_251114a.png Agent run, option lowercase Michel BOUISSOU, 2025-11-14 15:03
sysctl_technique_251114b.png (84.5 KB) sysctl_technique_251114b.png Technique, option Mixedcase Michel BOUISSOU, 2025-11-14 15:03
sysctl_agent_run_251114b.png (150 KB) sysctl_agent_run_251114b.png Agent run, option Mixedcase Michel BOUISSOU, 2025-11-14 15:03
sysctl_doc_discrepency_251114a.png (190 KB) sysctl_doc_discrepency_251114a.png Legend and coumentation discrepancy Michel BOUISSOU, 2025-11-14 15:03
sysctl_technique_251114a.png
sysctl_agent_run_251114a.png
sysctl_technique_251114b.png
sysctl_agent_run_251114b.png
sysctl_doc_discrepency_251114a.png

Subtasks 1 (1 open0 closed)

Bug #27966: Document in the upgrade notes that sysctl is broken in 9.0.0 and 9.0.1NewActions

Updated by François ARMAND 17 days ago Actions #1

  • Assignee set to Félix DALLIDET
  • Priority changed from To review to 1 (highest)

It is important to understand why we don't see repair anymore.

Updated by Nicolas CHARLES 17 days ago Actions #2

  • Regression changed from No to Yes

Updated by Félix DALLIDET 17 days ago Actions #3

  • Status changed from New to In progress

Updated by Félix DALLIDET 17 days ago Actions #4

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder/pull/6730

Updated by Félix DALLIDET 17 days ago Actions #5

  • Status changed from Pending technical review to Pending release

Updated by Nicolas CHARLES 6 days ago Actions #7

  • Subtask #27966 added
Actions

Also available in: PDF Atom