Bug 1258755 - First profile selection fails on ppc64 when tuned is newly installed and stopped
Summary: First profile selection fails on ppc64 when tuned is newly installed and stopped
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: Tereza Cerna
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-01 08:23 UTC by Tereza Cerna
Modified: 2016-11-04 07:24 UTC (History)
5 users (show)

Fixed In Version: tuned-2.7.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 07:24:22 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2479 normal SHIPPED_LIVE tuned bug fix and enhancement update 2016-11-03 14:08:42 UTC

Description Tereza Cerna 2015-09-01 08:23:14 UTC
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 08:30:36 UTC
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 11:37:18 UTC
============================
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 07:24:22 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://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.