Bug #27892
open“Sysctl value” generic method with “max” option improperly behaves in Rudder 9.0
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
Updated by François ARMAND 17 days ago
- 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
- Regression changed from No to Yes
Updated by Félix DALLIDET 17 days ago
- Status changed from New to In progress
Updated by Félix DALLIDET 17 days ago
- 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
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|e9967adf266d30620cbb31221572d00f3f9b5aa0.
Updated by Nicolas CHARLES 6 days ago
- Subtask #27966 added