1
0
Fork 0

Set manual profile mode on tuned-adm off

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 <olysonek@redhat.com>
This commit is contained in:
Ondřej Lysoněk 2019-11-26 16:53:04 +01:00
parent c044822aff
commit 5d8ef2c009

View file

@ -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")