tuned/tuned-2.20-rc1-sysctls-reapply-less-verbose.patch
Jaroslav Škarvada 4165d6699a post RC.1 fixes
related: rhbz#2133815
fixed possible traceback on SIGHUP
  resolves: rhbz#2169712

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2023-02-15 22:45:52 +01:00

33 lines
1.2 KiB
Diff

From 676ddcedfaecc57e2dcfef73dd8f189f03126ac1 Mon Sep 17 00:00:00 2001
From: Jiri Mencak <jmencak@users.noreply.github.com>
Date: Fri, 10 Feb 2023 14:57:24 +0100
Subject: [PATCH] Report reapplied sysctls only on different values
PR492 introduced reporting on reapplied sysctls. While it is a useful
functionality to get notified about potential conflicts between
filesystem-level and TuneD-level settings, it can generate a lot of
noise when these settings are equal. Report reapplied sysctls only when
filesystem-level and TuneD-level settings differ.
Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
---
tuned/plugins/plugin_sysctl.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tuned/plugins/plugin_sysctl.py b/tuned/plugins/plugin_sysctl.py
index c7a5d03..5e4e800 100644
--- a/tuned/plugins/plugin_sysctl.py
+++ b/tuned/plugins/plugin_sysctl.py
@@ -151,7 +151,7 @@ def _apply_sysctl_config_line(path, lineno, line, instance_sysctl):
% (path, lineno))
return
value = value.strip()
- if option in instance_sysctl:
+ if option in instance_sysctl and instance_sysctl[option] != value:
log.info("Overriding sysctl parameter '%s' from '%s' to '%s'"
% (option, instance_sysctl[option], value))
--
2.39.1