Bug 1362521

Summary: Cannot get info of a profile
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Škarvada <jskarvad>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Tereza Cerna <tcerna>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: extras-qa, james.hogarth, jeder, jskarvad, jv+fedora, pknirsch, tcerna
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tuned-2.7.1-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1362481 Environment:
Last Closed: 2016-11-04 07:28:38 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 Jaroslav Škarvada 2016-08-02 12:24:51 UTC
+++ This bug was initially created as a clone of Bug #1362481 +++

Description of problem:
Using the directive tuned-adm profile_info results in a stack trace and no information

Version-Release number of selected component (if applicable):
tuned-2.7.0-2.fc24.noarch

How reproducible:
Always

Steps to Reproduce:
1. tuned-adm profile_info

Actual results:
[root@server conf.d]# tuned-adm profile_info
Profile name:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tuned/admin/dbus_controller.py", line 42, in _idle
    self._action_exit_code = self._action(*self._action_args, **self._action_kwargs)
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 136, in _action_dbus_profile_info
    return self._controller.exit(self._print_profile_info(self._controller.profile_info(profile)))
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 121, in _print_profile_info
    print(ret[1])
NameError: global name 'ret' is not defined

^CTraceback (most recent call last):
  File "/usr/sbin/tuned-adm", line 88, in <module>
    result = admin.action(action_name, **options)
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 72, in action
    res = self._controller.run()
  File "/usr/lib/python2.7/site-packages/tuned/admin/dbus_controller.py", line 62, in run
    self._main_loop.run()
  File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 576, in run
    raise KeyboardInterrupt
KeyboardInterrupt


Expected results:
Details about the profile

Additional info:
Can list the available profiles fine:

[root@server conf.d]# tuned-adm list
Available profiles:
- balanced                    - General non-specialized tuned profile
- desktop                     - Optmize for the desktop use-case
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput.  Generally only necessary on older CPUs or 40G+ networks.
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads.  This is the default profile for RHEL7.
- virtual-guest               - Optimize for running inside a virtual guest.
- virtual-host                - Optimize for running KVM guests
Current active profile: balanced

--- Additional comment from Jaroslav Škarvada on 2016-08-02 14:22:52 CEST ---

Thanks for the report, it's regression, we hadn't test for it, upstream commit fixing the problem:
https://git.fedorahosted.org/cgit/tuned.git/commit/?id=1f365e4f364439091caf4a85e91ba72c9ce6f309

Comment 1 Jaroslav Škarvada 2016-08-02 12:25:25 UTC
It should be fixed, we only need test for it.

Comment 2 Jaroslav Škarvada 2016-08-02 13:01:28 UTC
(In reply to Jaroslav Škarvada from comment #1)
> It should be fixed, we only need test for it.

It's fixed in 2.7.1

Comment 4 Tereza Cerna 2016-08-03 12:39:14 UTC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reproduced in:
    tuned-2.7.1-1.el7.noarch
PASS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:: [  BEGIN   ] :: Running 'tuned-adm profile_info'
Profile name:
virtual-guest

Profile summary:
Optimize for running inside a virtual guest.

Profile description:

:: [   PASS   ] :: Command 'tuned-adm profile_info' (Expected 0, got 0)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reproduced in:
    tuned-2.7.0-1.el7.noarch
FAIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:: [  BEGIN   ] :: Running 'tuned-adm profile_info'
Profile name:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tuned/admin/dbus_controller.py", line 42, in _idle
    self._action_exit_code = self._action(*self._action_args, **self._action_kwargs)
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 136, in _action_dbus_profile_info
    return self._controller.exit(self._print_profile_info(self._controller.profile_info(profile)))
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 121, in _print_profile_info
    print(ret[1])
NameError: global name 'ret' is not defined
^CTraceback (most recent call last):
  File "/usr/sbin/tuned-adm", line 88, in <module>
    result = admin.action(action_name, **options)
  File "/usr/lib/python2.7/site-packages/tuned/admin/admin.py", line 72, in action
    res = self._controller.run()
  File "/usr/lib/python2.7/site-packages/tuned/admin/dbus_controller.py", line 62, in run
    self._main_loop.run()
  File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 551, in run
    raise KeyboardInterrupt
KeyboardInterrupt
:: [   FAIL   ] :: Command 'tuned-adm profile_info' (Expected 0, got 3)

Comment 6 errata-xmlrpc 2016-11-04 07:28:38 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