Bug 1258755 - First profile selection fails on ppc64 when tuned is newly installed and stopped
First profile selection fails on ppc64 when tuned is newly installed and stopped
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jaroslav Škarvada
Tereza Cerna
: EasyFix, Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-01 04:23 EDT by Tereza Cerna
Modified: 2016-11-04 03:24 EDT (History)
5 users (show)

See Also:
Fixed In Version: tuned-2.7.0-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-04 03:24:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tereza Cerna 2015-09-01 04:23:14 EDT
Description of problem:
First profile selection fails with traceback on architecture ppc64 when package tuned is newly installed on machine and service is stopped.

Version-Release number of selected component (if applicable):
tuned-2.5.1-3.el7.noarch

How reproducible:
always

Steps to Reproduce:
# yum install tuned
# arch
ppc64
# systemctl stop tuned.service
# systemctl status tuned.service | grep Active:
   Active: inactive (dead)
# tuned-adm list
Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?
Available profiles:
- balanced
- desktop
- latency-performance
- network-latency
- network-throughput
- powersave
- throughput-performance
- virtual-guest
- virtual-host
Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?
No current active profile.
# tuned-adm profile network-throughput
Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?
Trying to (re)start tuned...
Traceback (most recent call last):
  File "/usr/sbin/tuned-adm", line 72, in <module>
    result = action(**options)
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 80, in profile
    if retcode == 0:
NameError: global name 'retcode' is not defined
#
#
It is necessary to have newly installed tuned. 
Problem appears for first profile selection in the new installation of tuned.

Actual results:
There is traceback in current result.

Expected results:
It has to stop with any error message that service tuned is stopped.
Comment 1 Jaroslav Škarvada 2015-09-01 04:30:36 EDT
This is not ppc64 specific, it can be easily reproduced on any arch by e.g.:
# systemctl start tuned
# tuned-adm profile throughput-performance
# systemctl stop tuned
# tuned-adm profile balanced

The problem is caused by typo, which wasn't catched by automatic testsuite. It's trivial fix and it was already fixed in upstream by following commit:

https://git.fedorahosted.org/cgit/tuned.git/commit/?id=7b4596ba21893f12181630d73d6ec99f447104bc

It could cause bad user experience, but it probably doesn't qualify as release blocker. If you think it's blocker, please propose it.

What I don't understand is why tuned isn't running on ppc64 after installation. It should.
Comment 4 Tereza Cerna 2016-08-10 07:37:18 EDT
============================
Verified in:
    tuned-2.7.1-2.el7.noarch
PASS
============================

# systemctl start tuned
# tuned-adm profile throughput-performance
# systemctl stop tuned
# tuned-adm profile throughput-performance
Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?
Trying to (re)start tuned...
Tuned (re)started, changes applied.
# tuned-adm active
Current active profile: throughput-performance

============================
Reproduced in:
    tuned-2.5.1-4.el7.noarch
FAIL
============================

# systemctl start tuned
# tuned-adm profile throughput-performance
# systemctl stop tuned
# tuned-adm profile throughput-performance
Cannot talk to Tuned daemon via DBus. Is Tuned daemon running?
Trying to (re)start tuned...
Traceback (most recent call last):
  File "/usr/sbin/tuned-adm", line 72, in <module>
    result = action(**options)
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 80, in profile
    if retcode == 0:
NameError: global name 'retcode' is not defined
Comment 6 errata-xmlrpc 2016-11-04 03:24:22 EDT
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://rhn.redhat.com/errata/RHBA-2016-2479.html

Note You need to log in before you can comment on or make changes to this bug.