Bug 1687397

Summary: Regression: tuned-adm recommend doesn't work when tuned daemon is stopped
Product: Red Hat Enterprise Linux 7 Reporter: Jiří Mencák <jmencak>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.7CC: jeder, jskarvad, olysonek, psklenar, rhack
Target Milestone: rcKeywords: Patch, Regression, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tuned-2.11.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:04:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiří Mencák 2019-03-11 12:47:39 UTC
Description of problem:
In tuned 2.10, the "tuned-adm recommend" command used to work when the tuned daemon was stopped.  In tuned 2.11 rc1, it does not.

Version-Release number of selected component (if applicable):
tuned-2.11.0-0.1.rc1

How reproducible:
Always.


Steps to Reproduce:
1. Remove old tuned package
2. rpm -ivh tuned-2.11.0-0.1.rc1.el7.noarch.rpm
3. make sure the tuned daemon is stopped
4. tuned-adm recommend

Actual results:
root@b1: /var/lib # systemctl stop tuned
root@b1: /var/lib # rpm -qi tuned
Name        : tuned
Version     : 2.11.0
Release     : 0.1.rc1.el7
Architecture: noarch
Install Date: Mon 11 Mar 2019 08:15:22 AM EDT
Group       : Unspecified
Size        : 866778
License     : GPLv2+
Signature   : (none)
Source RPM  : tuned-2.11.0-0.1.rc1.el7.src.rpm
Build Date  : Mon 11 Mar 2019 06:15:35 AM EDT
Build Host  : ppc-021.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://www.tuned-project.org/
Summary     : A dynamic adaptive system tuning daemon
Description :
The tuned package contains a daemon that tunes system settings dynamically.
It does so by monitoring the usage of several system components periodically.
Based on that information components will then be put into lower or higher
power saving modes to adapt to the current usage. Currently only ethernet
network and ATA harddisk devices are implemented.
root@b1: /var/lib # tuned-adm recommend
Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?
Traceback (most recent call last):
  File "/usr/sbin/tuned-adm", line 119, in <module>
    result = admin.action(action_name, **options)
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 89, in action
    res = action(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 315, in _action_recommend_profile
    print(self._cmd.recommend_profile())
AttributeError: commands instance has no attribute 'recommend_profile'


Expected results:
Warning that the Daemon is not running is acceptable, but tuned-adm should return the recommended profile.

Additional info:
This bug would break the functionality in containerized tuned shipping in OCP 4.0

Run with old tuned:
root@b2: ~ # systemctl stop tuned
root@b2: ~ # rpm -qi tuned
Name        : tuned
Version     : 2.10.0
Release     : 6.el7
Architecture: noarch
Install Date: Mon 15 Oct 2018 11:57:55 PM EDT
Group       : Unspecified
Size        : 769461
License     : GPLv2+
Signature   : RSA/SHA256, Fri 07 Sep 2018 09:07:02 AM EDT, Key ID 199e2f91fd431d51
Source RPM  : tuned-2.10.0-6.el7.src.rpm
Build Date  : Fri 07 Sep 2018 08:56:47 AM EDT
Build Host  : ppc-021.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://www.tuned-project.org/
Summary     : A dynamic adaptive system tuning daemon
Description :
The tuned package contains a daemon that tunes system settings dynamically.
It does so by monitoring the usage of several system components periodically.
Based on that information components will then be put into lower or higher
power saving modes to adapt to the current usage. Currently only ethernet
network and ATA harddisk devices are implemented.
root@b2: ~ # tuned-adm recommend
Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?
openshift-control-plane
root@b2: ~ #

Comment 3 Jaroslav Škarvada 2019-03-11 16:23:48 UTC
https://github.com/redhat-performance/tuned/pull/169/

Comment 8 errata-xmlrpc 2019-08-06 13:04:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2201