From 6a258aed9df14e23f0fe1a69beffebec48b844e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 12 Jun 2015 16:21:09 +0200 Subject: [PATCH] plugin_scheduler: added support for variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaroslav Škarvada --- tuned/plugins/plugin_scheduler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tuned/plugins/plugin_scheduler.py b/tuned/plugins/plugin_scheduler.py index a4a6497..2ecb559 100644 --- a/tuned/plugins/plugin_scheduler.py +++ b/tuned/plugins/plugin_scheduler.py @@ -112,6 +112,8 @@ class SchedulerPlugin(base.Plugin): if ps is None: log.error("error applying tuning, cannot get information about running processes") return + for k in instance._scheduler: + instance._scheduler[k] = self._variables.expand(instance._scheduler[k]) sched_cfg = map(lambda (option, value): (option, value.split(":", 4)), instance._scheduler.items()) buf = filter(lambda (option, vals): re.match(r"group\.", option) and len(vals) == 5, sched_cfg) sched_cfg = sorted(buf, key=lambda (option, vals): vals[0])