From d25f1eece86ef90380aeb2fdc96a2e5640d18329 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 03 2019 13:22:17 +0000 Subject: import tuned-2.11.0-5.el7_7.1 --- diff --git a/SOURCES/tuned-2.11.0-sysctl-modifiers-traceback-fix.patch b/SOURCES/tuned-2.11.0-sysctl-modifiers-traceback-fix.patch new file mode 100644 index 0000000..4cafa8d --- /dev/null +++ b/SOURCES/tuned-2.11.0-sysctl-modifiers-traceback-fix.patch @@ -0,0 +1,45 @@ +From a8f2a8306e1bac6cfc739e6753d381bf509c995e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Fri, 9 Aug 2019 11:40:48 +0200 +Subject: [PATCH] plugin_sysctl: fixed traceback with modifiers '>', '<' and + orig==new +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It fixed the following problem e.g. the profile: +[sysctl] +kernel.pid_max=>131072 + +and if kernel.pid_max is already 131072 Tuned shows traceback. + +Resolves: rhbz#1739418 + +Signed-off-by: Jaroslav Škarvada +--- + tuned/plugins/plugin_sysctl.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tuned/plugins/plugin_sysctl.py b/tuned/plugins/plugin_sysctl.py +index bcaead2..b298bfa 100644 +--- a/tuned/plugins/plugin_sysctl.py ++++ b/tuned/plugins/plugin_sysctl.py +@@ -54,12 +54,13 @@ class SysctlPlugin(base.Plugin): + log.error("sysctl option %s will not be set, failed to read the original value." + % option) + else: +- instance._sysctl_original[option] = original_value + new_value = self._variables.expand( + self._cmd.unquote(value)) + new_value = self._process_assignment_modifiers( + new_value, original_value) +- _write_sysctl(option, new_value) ++ if new_value is not None: ++ instance._sysctl_original[option] = original_value ++ _write_sysctl(option, new_value) + + storage_key = self._storage_key(instance.name) + self._storage.set(storage_key, instance._sysctl_original) +-- +2.20.1 + diff --git a/SPECS/tuned.spec b/SPECS/tuned.spec index 3a2b3c7..d04f711 100644 --- a/SPECS/tuned.spec +++ b/SPECS/tuned.spec @@ -7,7 +7,7 @@ Summary: A dynamic adaptive system tuning daemon Name: tuned Version: 2.11.0 -Release: 5%{?prerel1}%{?dist} +Release: 5%{?prerel1}%{?dist}.1 License: GPLv2+ Source: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel2}.tar.gz URL: http://www.tuned-project.org/ @@ -29,6 +29,7 @@ Patch2: 0001-functions-Return-an-ordered-cpu-list-in-cpulist_onli.patch Patch3: 0001-Fix-verifying-sysctl-options-with-tabs.patch # Upstream patch: Patch4: 0001-sysctl-Ignore-non-existent-settings-from-system-sysc.patch +Patch5: tuned-2.11.0-sysctl-modifiers-traceback-fix.patch %description The tuned package contains a daemon that tunes system settings dynamically. @@ -166,6 +167,7 @@ It can be also used to fine tune your system for specific scenarios. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build @@ -417,6 +419,12 @@ fi %{_mandir}/man7/tuned-profiles-compat.7* %changelog +* Fri Aug 9 2019 Jaroslav Škarvada - 2.11.0-5.1 +- plugin_sysctl: fixed traceback when assignments modifiers ('<', '>') + are used with sysctl and the current sysctl value is the same as + the new value + Resolves: rhbz#1739563 + * Fri Jun 07 2019 Ondřej Lysoněk - 2.11.0-5 - Ignore non-existent settings from system sysctl configs - Resolves: rhbz#1714595