basebuilder_pel7ppc64lebuilder0
4 years ago
8 changed files with 360 additions and 14 deletions
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
From b6eb3416eac4e8ca21ae7d65ca9a79f18e078af7 Mon Sep 17 00:00:00 2001 |
||||
From: kbotc <kbotc@mac.com> |
||||
Date: Tue, 14 May 2019 16:45:22 -0600 |
||||
Subject: [PATCH] Fix verifying sysctl options with tabs |
||||
|
||||
sysctl options such as net.ipv4.tcp_wmem and net.ipv4.tcp_rmem include tabs. When you use tuned-adm verify, the changes report back as broken as the whitespaces are different because one side has been sanitized but the other side has not. This pull request will fix that. |
||||
--- |
||||
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 9088bf0..537c896 100644 |
||||
--- a/tuned/plugins/plugin_sysctl.py |
||||
+++ b/tuned/plugins/plugin_sysctl.py |
||||
@@ -76,7 +76,7 @@ class SysctlPlugin(base.Plugin): |
||||
curr_val = _read_sysctl(option) |
||||
value = self._process_assignment_modifiers(self._variables.expand(value), curr_val) |
||||
if value is not None: |
||||
- if self._verify_value(option, self._cmd.remove_ws(value), curr_val, ignore_missing) == False: |
||||
+ if self._verify_value(option, self._cmd.remove_ws(value), self._cmd.remove_ws(curr_val), ignore_missing) == False: |
||||
ret = False |
||||
return ret |
||||
|
||||
-- |
||||
2.20.1 |
||||
|
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
From e0bf0252a45a60b9cf4d359c3bf171baed28ba70 Mon Sep 17 00:00:00 2001 |
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com> |
||||
Date: Thu, 9 May 2019 10:23:07 +0200 |
||||
Subject: [PATCH] functions: Return an ordered cpu list in cpulist_online |
||||
MIME-Version: 1.0 |
||||
Content-Type: text/plain; charset=UTF-8 |
||||
Content-Transfer-Encoding: 8bit |
||||
|
||||
cpulist_unpack, which is used in the function, returns an ordered cpu |
||||
list, however by converting it to a set, the order is lost. Rewrite the |
||||
operation in a way that preserves the order. |
||||
|
||||
Resolves: rhbz#1706171 |
||||
|
||||
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> |
||||
--- |
||||
tuned/profiles/functions/function_cpulist_online.py | 2 +- |
||||
1 file changed, 1 insertion(+), 1 deletion(-) |
||||
|
||||
diff --git a/tuned/profiles/functions/function_cpulist_online.py b/tuned/profiles/functions/function_cpulist_online.py |
||||
index 1badf3d..64d930c 100644 |
||||
--- a/tuned/profiles/functions/function_cpulist_online.py |
||||
+++ b/tuned/profiles/functions/function_cpulist_online.py |
||||
@@ -19,4 +19,4 @@ class cpulist_online(base.Function): |
||||
return None |
||||
cpus = self._cmd.cpulist_unpack(",".join(args)) |
||||
online = self._cmd.cpulist_unpack(self._cmd.read_file("/sys/devices/system/cpu/online")) |
||||
- return ",".join(str(v) for v in set(cpus).intersection(set(online))) |
||||
+ return ",".join(str(v) for v in cpus if v in online) |
||||
-- |
||||
2.20.1 |
||||
|
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
From fb6d2cc90e09e85586bf5599c298fb01c3f01eee Mon Sep 17 00:00:00 2001 |
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com> |
||||
Date: Wed, 29 May 2019 17:07:55 +0200 |
||||
Subject: [PATCH] sysctl: Ignore non-existent settings from system sysctl |
||||
configs |
||||
MIME-Version: 1.0 |
||||
Content-Type: text/plain; charset=UTF-8 |
||||
Content-Transfer-Encoding: 8bit |
||||
|
||||
Ignore non-existent sysctl settings from the system configuration files |
||||
(/etc/sysctl.conf, etc.). Logging errors about these settings hurts user |
||||
experience, if the non-existent settings are in fact real settings that |
||||
are just temporarily unavailable. For example, the following settings |
||||
(from /usr/lib/sysctl.d/00-system.conf on RHEL-7) are not available until |
||||
the br_netfilter module is loaded. However once that module is loaded, |
||||
it is often desirable to set these, so having them in a RHEL-provided |
||||
configuration file makes sense. |
||||
|
||||
net.bridge.bridge-nf-call-ip6tables = 0 |
||||
net.bridge.bridge-nf-call-iptables = 0 |
||||
net.bridge.bridge-nf-call-arptables = 0 |
||||
|
||||
This change restores the old behaviour before the recent rewrite of the |
||||
sysctl plugin away from using the 'sysctl' program (running |
||||
'sysctl --system' ignores missing settings). |
||||
|
||||
Resolves: rhbz#1714595 |
||||
|
||||
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> |
||||
--- |
||||
tuned/plugins/plugin_sysctl.py | 7 ++++--- |
||||
1 file changed, 4 insertions(+), 3 deletions(-) |
||||
|
||||
diff --git a/tuned/plugins/plugin_sysctl.py b/tuned/plugins/plugin_sysctl.py |
||||
index 537c896..13e2eac 100644 |
||||
--- a/tuned/plugins/plugin_sysctl.py |
||||
+++ b/tuned/plugins/plugin_sysctl.py |
||||
@@ -133,7 +133,7 @@ def _apply_sysctl_config_line(path, lineno, line): |
||||
% (path, lineno)) |
||||
return |
||||
value = value.strip() |
||||
- _write_sysctl(option, value) |
||||
+ _write_sysctl(option, value, ignore_missing = True) |
||||
|
||||
def _get_sysctl_path(option): |
||||
return "/proc/sys/%s" % option.replace(".", "/") |
||||
@@ -161,7 +161,7 @@ def _read_sysctl(option): |
||||
% (option, str(e))) |
||||
return None |
||||
|
||||
-def _write_sysctl(option, value): |
||||
+def _write_sysctl(option, value, ignore_missing = False): |
||||
path = _get_sysctl_path(option) |
||||
if os.path.basename(path) in DEPRECATED_SYSCTL_OPTIONS: |
||||
log.error("Refusing to set deprecated sysctl option %s" |
||||
@@ -175,7 +175,8 @@ def _write_sysctl(option, value): |
||||
return True |
||||
except (OSError, IOError) as e: |
||||
if e.errno == errno.ENOENT: |
||||
- log.error("Failed to set sysctl parameter '%s' to '%s', the parameter does not exist" |
||||
+ log_func = log.debug if ignore_missing else log.error |
||||
+ log_func("Failed to set sysctl parameter '%s' to '%s', the parameter does not exist" |
||||
% (option, value)) |
||||
else: |
||||
log.error("Failed to set sysctl parameter '%s' to '%s': %s" |
||||
-- |
||||
2.20.1 |
||||
|
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
From 96363628f728f296d2efc69d1d3914afdfbbb844 Mon Sep 17 00:00:00 2001 |
||||
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com> |
||||
Date: Thu, 25 Apr 2019 10:42:03 +0200 |
||||
Subject: [PATCH] virtual-host: Fix setting force_latency |
||||
MIME-Version: 1.0 |
||||
Content-Type: text/plain; charset=UTF-8 |
||||
Content-Transfer-Encoding: 8bit |
||||
|
||||
The force_latency parameter belongs to the cpu plugin, so that's the |
||||
section it needs to be in. |
||||
|
||||
Fixes #132 |
||||
Resolves: rhbz#1569375 |
||||
|
||||
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> |
||||
--- |
||||
profiles/virtual-host/tuned.conf | 1 + |
||||
1 file changed, 1 insertion(+) |
||||
|
||||
diff --git a/profiles/virtual-host/tuned.conf b/profiles/virtual-host/tuned.conf |
||||
index 7bd3330..ca493d6 100644 |
||||
--- a/profiles/virtual-host/tuned.conf |
||||
+++ b/profiles/virtual-host/tuned.conf |
||||
@@ -16,5 +16,6 @@ vm.dirty_background_ratio = 5 |
||||
# (system default is 500000, i.e. 0.5 ms) |
||||
kernel.sched_migration_cost_ns = 5000000 |
||||
|
||||
+[cpu] |
||||
# Setting C3 state sleep mode/power savings |
||||
force_latency=70 |
||||
-- |
||||
2.20.1 |
||||
|
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
diff --git a/profiles/realtime-virtual-guest/script.sh b/profiles/realtime-virtual-guest/script.sh |
||||
index 33cb730..ce94a4b 100755 |
||||
--- a/profiles/realtime-virtual-guest/script.sh |
||||
+++ b/profiles/realtime-virtual-guest/script.sh |
||||
@@ -2,8 +2,13 @@ |
||||
|
||||
. /usr/lib/tuned/functions |
||||
|
||||
+KTIMER_LOCKLESS_FILE=/sys/kernel/ktimer_lockless_check |
||||
+ |
||||
start() { |
||||
systemctl start rt-entsk |
||||
+ if [ -f $KTIMER_LOCKLESS_FILE ]; then |
||||
+ echo 1 > $KTIMER_LOCKLESS_FILE |
||||
+ fi |
||||
return "$?" |
||||
} |
||||
|
||||
diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh |
||||
index 8ff5509..be1804f 100755 |
||||
--- a/profiles/realtime-virtual-host/script.sh |
||||
+++ b/profiles/realtime-virtual-host/script.sh |
||||
@@ -5,6 +5,7 @@ |
||||
CACHE_VALUE_FILE=./lapic_timer_adv_ns |
||||
CACHE_CPU_FILE=./lapic_timer_adv_ns.cpumodel |
||||
KVM_LAPIC_FILE=/sys/module/kvm/parameters/lapic_timer_advance_ns |
||||
+KTIMER_LOCKLESS_FILE=/sys/kernel/ktimer_lockless_check |
||||
QEMU=$(type -P qemu-kvm || echo /usr/libexec/qemu-kvm) |
||||
TSCDEADLINE_LATENCY="/usr/share/qemu-kvm/tscdeadline_latency.flat" |
||||
if [ ! -f "$TSCDEADLINE_LATENCY" ]; then |
||||
@@ -100,6 +101,10 @@ start() { |
||||
fi |
||||
systemctl start rt-entsk |
||||
|
||||
+ if [ -f $KTIMER_LOCKLESS_FILE ]; then |
||||
+ echo 1 > $KTIMER_LOCKLESS_FILE |
||||
+ fi |
||||
+ |
||||
return 0 |
||||
} |
||||
|
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
diff --git a/man/tuned-profiles-sap-hana.7 b/man/tuned-profiles-sap-hana.7 |
||||
index e199f27..a56274c 100644 |
||||
--- a/man/tuned-profiles-sap-hana.7 |
||||
+++ b/man/tuned-profiles-sap-hana.7 |
||||
@@ -37,6 +37,9 @@ regarding semaphores. |
||||
|
||||
.TP |
||||
.BI "sap\-hana\-vmware" |
||||
+Deprecated profile. It is being kept here for backward compatibility. |
||||
+Original description follows: |
||||
+ |
||||
A performance optimized profile for the SAP HANA applications on VMware. |
||||
It is based on throughput\-performance profile. It additionally disables |
||||
transparent hugepages, locks CPU to the low C states (by PM QoS) and tunes sysctl |
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
From a8f2a8306e1bac6cfc739e6753d381bf509c995e Mon Sep 17 00:00:00 2001 |
||||
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com> |
||||
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 <jskarvad@redhat.com> |
||||
--- |
||||
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 |
||||
|
Loading…
Reference in new issue