From 5d8ef2c0095e999107574ebfb86e735bc048756e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 26 Nov 2019 16:53:04 +0100 Subject: [PATCH] Set manual profile mode on tuned-adm off MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To fix rhbz#1774645 and rhbz#1702724, we need to make the `Controller.reload` operation behave the same as a Tuned restart even in the case when Tuned is running but no profile is applied. If we did that, while setting automatic profile mode on `tuned-adm off` (as it is currently done), we would end up with a behaviour where `tuned-adm off` followed by controller reload would result in the recommended profile being applied. We agreed with Jaroslav that this behaviour wouldn't make sense, so we instead decided to change the behaviour of `tuned-adm off` followed by Tuned *restart*. Previously, it would result in the recommended profile being applied (which doesn't make much sense to us either). So we decided to change `tuned-adm off`, so that even after restart, Tuned runs with no profile applied, i.e. making `tuned-adm off` set manual profile mode. Related: rhbz#1774645 Related: rhbz#1702724 Signed-off-by: Ondřej Lysoněk --- tuned/daemon/controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuned/daemon/controller.py b/tuned/daemon/controller.py index 48c30ea..5bd4d31 100644 --- a/tuned/daemon/controller.py +++ b/tuned/daemon/controller.py @@ -219,7 +219,7 @@ class Controller(tuned.exports.interfaces.ExportableInterface): if self._daemon.is_running(): self._daemon.stop() if self._daemon.is_enabled(): - self._daemon.set_profile(None, None, save_instantly=True) + self._daemon.set_profile(None, True, save_instantly=True) return True @exports.export("", "b")