new release

rebased tuned to latest upstream
    resolves: rhbz#1643654
  use online CPUs for cpusets calculations instead of present CPUs
    resolves: rhbz#1613478
  realtime-virtual-guest: run script.sh
    related: rhbz#1616043
  make python-dmidecode a weak dependency
    resolves: rhbz#1565598
  make virtual-host identical to latency-performance
    resolves: rhbz#1588932
  added support for Boot loader specification (BLS)
    resolves: rhbz#1576435
  scheduler: keep polling file objects alive long enough
    resolves: rhbz#1659140
  mssql: updated tuning
    resolves: rhbz#1660178
  s2kb: fixed to be compatible with python3
    resolves: rhbz#1684122
  profiles: fallback to the 'powersave' scaling governor
    resolves: rhbz#1679205
  disable KSM only once, re-enable it only on full rollback
    resolves: rhbz#1622239
  functions: reworked setup_kvm_mod_low_latency to count with kernel changes
    resolves: rhbz#1649408
  updated virtual-host profile
    resolves: rhbz#1569375
  added log message for unsupported parameters in plugin_net
    resolves: rhbz#1533852
  added range feature for cpu exclusion
    resolves: rhbz#1533908
  make a copy of devices when verifying tuning
    resolves: rhbz#1592743
  fixed disk plugin/plugout problem
    resolves: rhbz#1595156
  fixed unit configuration reading
    resolves: rhbz#1613379
  reload profile configuration on SIGHUP
    resolves: rhbz#1631744
  use built-in functionality to apply system sysctl
    resolves: rhbz#1663412
This commit is contained in:
Jaroslav Škarvada 2019-03-10 22:53:26 +01:00
parent 851e11e374
commit 0f8bd5f424
7 changed files with 77 additions and 208 deletions

View File

@ -1,35 +0,0 @@
From 2cc3d747986837d7e7957f5a4baede2dd691348a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
Date: Thu, 24 Jan 2019 16:28:24 +0100
Subject: [PATCH] plugin_disk: Fix checking the 'removable' attribute on
python3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The 'removable' attribute is a bytestring, so it will never be equal to
"0" in python3. Check equality with b"0" instead.
The patch was originally written by Tomáš Korbař.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
---
tuned/plugins/plugin_disk.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py
index 1de1257..65504d8 100644
--- a/tuned/plugins/plugin_disk.py
+++ b/tuned/plugins/plugin_disk.py
@@ -39,7 +39,7 @@ class DiskPlugin(hotplug.Plugin):
@classmethod
def _device_is_supported(cls, device):
return device.device_type == "disk" and \
- device.attributes.get("removable", None) == "0" and \
+ device.attributes.get("removable", None) == b"0" and \
(device.parent is None or \
device.parent.subsystem in ["scsi", "virtio", "xen"])
--
2.20.1

View File

@ -1,38 +0,0 @@
From 6678c472abbd5f645dbb99ab2946c0e35ded7499 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
Date: Tue, 10 Jul 2018 00:24:00 +0200
Subject: [PATCH] tuned-adm: Fix a traceback when run without action specified
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Running tuned-adm without an action specified using Python 3 results
in a traceback. This is because in this case parse_args does not
exit with a usage message in Python 3 and the 'action' option
is then undefined.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
---
tuned-adm.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tuned-adm.py b/tuned-adm.py
index 1b9623d..1df8cc3 100755
--- a/tuned-adm.py
+++ b/tuned-adm.py
@@ -100,7 +100,11 @@ if __name__ == "__main__":
debug = options.pop("debug")
asynco = options.pop("async")
timeout = options.pop("timeout")
- action_name = options.pop("action")
+ try:
+ action_name = options.pop("action")
+ except KeyError:
+ parser.print_usage(file = sys.stderr)
+ sys.exit(1)
log_level = options.pop("loglevel")
result = False
--
2.14.4

View File

@ -1,35 +0,0 @@
From d46834808c3226b3a6e48649df65befc399c21cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
Date: Wed, 11 Jul 2018 00:41:45 +0200
Subject: [PATCH] tuned-gui: Sort plugins based on their name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Previously the sorting was done by comparing the objects themselves,
which is not what we want and it doesn't work in Python 3 - TypeError
is raised, e.g:
TypeError: '<' not supported between instances of 'BootloaderPlugin' and 'MountsPlugin'
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
---
tuned-gui.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tuned-gui.py b/tuned-gui.py
index 8f72fd5..e486687 100755
--- a/tuned-gui.py
+++ b/tuned-gui.py
@@ -278,7 +278,8 @@ class Base(object):
self.treestore_profiles = Gtk.ListStore(GObject.TYPE_STRING,
GObject.TYPE_STRING)
self.treestore_plugins = Gtk.ListStore(GObject.TYPE_STRING)
- for plugin in sorted(self.plugin_loader.plugins):
+ for plugin in sorted(self.plugin_loader.plugins,
+ key = lambda plugin: plugin.name):
self.treestore_plugins.append([plugin.name])
self.combobox_plugins = \
self.builder.get_object('comboboxPlugins')
--
2.14.4

View File

@ -1 +1 @@
SHA512 (tuned-2.10.0.tar.gz) = e0674533f17ac27cd3647808cda1f51d9905f563521af8cb3ffd1854098d6e2ca1adac82e542e6bdf86cce7e659303464eac50b8823167360783a75843d02a60
SHA512 (tuned-2.11.0-rc.1.tar.gz) = 95fba1698bb4b4d938e113f3c78413253aa2c4580c8794f860e8d6efabe83f3e8905c36603910ec8af95880f128f7cabe4a01127392920078dcb2a4206b01f42

View File

@ -1,18 +0,0 @@
--- a/Makefile
+++ b/Makefile
@@ -30,12 +30,12 @@ VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX)
SYSCONFDIR = /etc
DATADIR = /usr/share
DOCDIR = $(DATADIR)/doc/$(NAME)
-PYTHON = python3
+PYTHON = /usr/bin/python3
PYLINT = pylint-3
ifeq ($(PYTHON),python2)
PYLINT = pylint-2
endif
-SHEBANG_REWRITE_REGEX= '1s/^(\#!\/usr\/bin\/)\<python\>/\1$(PYTHON)/'
+SHEBANG_REWRITE_REGEX= '1s|^\#!/usr/bin/\<python\>|\#!$(PYTHON)|'
PYTHON_SITELIB = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib());')
ifeq ($(PYTHON_SITELIB),)
$(error Failed to determine python library directory)

View File

@ -1,60 +0,0 @@
From f19b7c5713acb76a200811f6531acf2791505cac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
Date: Wed, 4 Jul 2018 23:27:38 +0200
Subject: [PATCH] Fixed compatibility with python-3.7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In python-3.7 async is a keyword, so it cannot be redefined.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
---
tuned-adm.py | 4 ++--
tuned/admin/admin.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tuned-adm.py b/tuned-adm.py
index ea85c54..1b9623d 100755
--- a/tuned-adm.py
+++ b/tuned-adm.py
@@ -98,7 +98,7 @@ if __name__ == "__main__":
options = vars(args)
debug = options.pop("debug")
- async = options.pop("async")
+ asynco = options.pop("async")
timeout = options.pop("timeout")
action_name = options.pop("action")
log_level = options.pop("loglevel")
@@ -107,7 +107,7 @@ if __name__ == "__main__":
dbus = config.get_bool(consts.CFG_DAEMON, consts.CFG_DEF_DAEMON)
try:
- admin = tuned.admin.Admin(dbus, debug, async, timeout, log_level)
+ admin = tuned.admin.Admin(dbus, debug, asynco, timeout, log_level)
result = admin.action(action_name, **options)
except:
diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py
index 728af32..3f84413 100644
--- a/tuned/admin/admin.py
+++ b/tuned/admin/admin.py
@@ -14,12 +14,12 @@ import threading
import logging
class Admin(object):
- def __init__(self, dbus = True, debug = False, async = False,
+ def __init__(self, dbus = True, debug = False, asynco = False,
timeout = consts.ADMIN_TIMEOUT,
log_level = logging.ERROR):
self._dbus = dbus
self._debug = debug
- self._async = async
+ self._async = asynco
self._timeout = timeout
self._cmd = commands(debug)
self._profiles_locator = profiles_locator(consts.LOAD_DIRECTORIES)
--
2.14.4

View File

@ -23,18 +23,18 @@
%endif
%endif
#%%global prerelease rc
#%%global prereleasenum 2
%global prerelease rc
%global prereleasenum 1
%global prerel1 %{?prerelease:.%{prerelease}%{prereleasenum}}
%global prerel2 %{?prerelease:-%{prerelease}.%{prereleasenum}}
Summary: A dynamic adaptive system tuning daemon
Name: tuned
Version: 2.10.0
Release: 7%{?prerel1}%{?dist}
Version: 2.11.0
Release: 0.1%{?prerel1}%{?dist}
License: GPLv2+
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel2}.tar.gz
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz
URL: http://www.tuned-project.org/
BuildArch: noarch
BuildRequires: systemd, desktop-file-utils
@ -47,24 +47,23 @@ Requires: %{_py}-schedutils, %{_py}-linux-procfs, %{_py}-perf
# requires for packages with inconsistent python2/3 names
%if %{with python3}
Requires: python3-dbus, python3-gobject-base
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
Recommends: python3-dmidecode
%endif
%else
Requires: dbus-python, pygobject3-base
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
Recommends: python-dmidecode
%endif
%endif
Requires: virt-what, ethtool, gawk, hdparm
Requires: util-linux, dbus, polkit
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
Recommends: kernel-tools
%endif
# Upstream patch:
Patch0: tuned-2.10.0-python-3.7-fix.patch
# Upstream patch:
Patch1: 0001-tuned-adm-Fix-a-traceback-when-run-without-action-sp.patch
# Upstream patch:
Patch2: tuned-2.10.0-makefile-full-python-path.patch
# Upstream patch:
Patch3: 0001-tuned-gui-Sort-plugins-based-on-their-name.patch
# Upstream patch
Patch4: 0001-plugin_disk-Fix-checking-the-removable-attribute-on-.patch
%if 0%{?rhel} > 7
Requires: python3-syspurpose
%endif
%description
The tuned package contains a daemon that tunes system settings dynamically.
@ -209,11 +208,6 @@ It can be also used to fine tune your system for specific scenarios.
%prep
%setup -q -n %{name}-%{version}%{?prerel2}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
@ -278,6 +272,24 @@ if [ "$1" == 0 ]; then
if [ -r "%{_sysconfdir}/default/grub" ]; then
sed -i '/GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT:+$GRUB_CMDLINE_LINUX_DEFAULT }\\$tuned_params"/d' %{_sysconfdir}/default/grub
fi
# cleanup for Boot loader specification (BLS)
# clear grubenv variables
grub2-editenv - unset tuned_params tuned_initrd &>/dev/null || :
# unpatch BLS entries
MACHINE_ID=`cat /etc/machine-id 2>/dev/null`
if [ "$MACHINE_ID" ]
then
for f in /boot/loader/entries/$MACHINE_ID-*.conf
do
if [ -f "$f" -a "${f: -12}" != "-rescue.conf" ]
then
sed -i '/^\s*options\s\+.*\$tuned_params/ s/\s\+\$tuned_params\b//g' "$f" &>/dev/null || :
sed -i '/^\s*initrd\s\+.*\$tuned_initrd/ s/\s\+\$tuned_initrd\b//g' "$f" &>/dev/null || :
fi
done
fi
fi
@ -358,6 +370,7 @@ fi
%{_datadir}/tuned/grub2
%{_datadir}/polkit-1/actions/com.redhat.tuned.policy
%ghost %{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf
%{_prefix}/lib/kernel/install.d/92-tuned.install
%files gtk
%{_sbindir}/tuned-gui
@ -367,7 +380,6 @@ fi
%{python2_sitelib}/tuned/gtk
%endif
%{_datadir}/tuned/ui
%{_datadir}/polkit-1/actions/com.redhat.tuned.gui.policy
%{_datadir}/icons/hicolor/scalable/apps/tuned.svg
%{_datadir}/applications/tuned-gui.desktop
@ -446,6 +458,49 @@ fi
%{_mandir}/man7/tuned-profiles-compat.7*
%changelog
* Sun Mar 10 2019 Jaroslav Škarvada <jskarvad@redhat.com> - 2.11.0-0.1.rc1
- new release
- rebased tuned to latest upstream
resolves: rhbz#1643654
- use online CPUs for cpusets calculations instead of present CPUs
resolves: rhbz#1613478
- realtime-virtual-guest: run script.sh
related: rhbz#1616043
- make python-dmidecode a weak dependency
resolves: rhbz#1565598
- make virtual-host identical to latency-performance
resolves: rhbz#1588932
- added support for Boot loader specification (BLS)
resolves: rhbz#1576435
- scheduler: keep polling file objects alive long enough
resolves: rhbz#1659140
- mssql: updated tuning
resolves: rhbz#1660178
- s2kb: fixed to be compatible with python3
resolves: rhbz#1684122
- profiles: fallback to the 'powersave' scaling governor
resolves: rhbz#1679205
- disable KSM only once, re-enable it only on full rollback
resolves: rhbz#1622239
- functions: reworked setup_kvm_mod_low_latency to count with kernel changes
resolves: rhbz#1649408
- updated virtual-host profile
resolves: rhbz#1569375
- added log message for unsupported parameters in plugin_net
resolves: rhbz#1533852
- added range feature for cpu exclusion
resolves: rhbz#1533908
- make a copy of devices when verifying tuning
resolves: rhbz#1592743
- fixed disk plugin/plugout problem
resolves: rhbz#1595156
- fixed unit configuration reading
resolves: rhbz#1613379
- reload profile configuration on SIGHUP
resolves: rhbz#1631744
- use built-in functionality to apply system sysctl
resolves: rhbz#1663412
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild