From 9cb7d9110df363ae4689c6f0e669e560e5342d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 24 Jul 2017 21:44:08 +0200 Subject: [PATCH] fixed traceback in disk plugin if dynamic tuning is enabled --- tuned-2.8.0-plugin-disk-traceback-fix.patch | 25 +++++++++++++++++++++ tuned.spec | 8 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tuned-2.8.0-plugin-disk-traceback-fix.patch diff --git a/tuned-2.8.0-plugin-disk-traceback-fix.patch b/tuned-2.8.0-plugin-disk-traceback-fix.patch new file mode 100644 index 0000000..ec75b10 --- /dev/null +++ b/tuned-2.8.0-plugin-disk-traceback-fix.patch @@ -0,0 +1,25 @@ +From b776b7420cca949bf1e1e128e2cbbc9348d2345c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Mon, 24 Jul 2017 16:42:28 +0200 +Subject: [PATCH] disk: Fix traceback in dynamic tuning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Ondřej Lysoněk +--- + tuned/plugins/plugin_disk.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tuned/plugins/plugin_disk.py b/tuned/plugins/plugin_disk.py +index f91bd4e..22721d5 100644 +--- a/tuned/plugins/plugin_disk.py ++++ b/tuned/plugins/plugin_disk.py +@@ -180,6 +180,7 @@ def _instance_update_dynamic(self, instance, device): + (rc, out) = self._cmd.execute(["hdparm", "-B%d" % new_power_level, "/dev/%s" % device], no_errors = [errno.ENOENT]) + self._update_errcnt(rc, False) + elif instance._spindown_change_delayed[device] and self._drive_spinning(device): ++ new_spindown_level = self._spindown_levels[idle["level"]] + self._change_spindown(instance, device, new_spindown_level) + + log.debug("%s load: read %0.2f, write %0.2f" % (device, stats["read"], stats["write"])) diff --git a/tuned.spec b/tuned.spec index b8cdc43..3efcebc 100644 --- a/tuned.spec +++ b/tuned.spec @@ -1,7 +1,7 @@ Summary: A dynamic adaptive system tuning daemon Name: tuned Version: 2.8.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Source: https://jskarvad.fedorapeople.org/tuned/download/tuned-%{version}.tar.bz2 URL: http://www.tuned-project.org/ @@ -14,6 +14,8 @@ Requires: python-decorator, dbus-python, pygobject3-base, python-pyudev Requires: virt-what, python-configobj, ethtool, gawk, kernel-tools, hdparm Requires: util-linux, python-perf, dbus, polkit, python-linux-procfs Requires: python-schedutils +# patch taken from upstream (issue #59) +Patch0: tuned-2.8.0-plugin-disk-traceback-fix.patch %description The tuned package contains a daemon that tunes system settings dynamically. @@ -142,6 +144,7 @@ It can be also used to fine tune your system for specific scenarios. %prep %setup -q +%patch0 -p1 %build @@ -379,6 +382,9 @@ fi %{_mandir}/man7/tuned-profiles-compat.7* %changelog +* Mon Jul 24 2017 Jaroslav Škarvada - 2.8.0-3 +- fixed traceback in disk plugin if dynamic tuning is enabled + * Fri Apr 28 2017 Jaroslav Škarvada - 2.8.0-2 - qemu-kvm-tools-rhev made weak dependency