Bug 620686 - tuned-adm profile default is failing
tuned-adm profile default is failing
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tuned (Show other bugs)
6.0
All Linux
low Severity urgent
: rc
: ---
Assigned To: Phil Knirsch
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-03 05:25 EDT by Jiri Hladky
Modified: 2015-03-04 20:20 EST (History)
7 users (show)

See Also:
Fixed In Version: tuned-0.2.11-7.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-12 08:43:49 EST
Type: ---
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 Jiri Hladky 2010-08-03 05:25:16 EDT
Description of problem:

[root@hp-bl495cg5-02 default]# tuned-adm off
[root@hp-bl495cg5-02 default]# tuned-adm profile default
Switching to profile 'default'
Applying ktune sysctl settings:
/etc/ktune.d/tunedadm.conf:                                [  OK  ]
Applying sysctl settings from /etc/sysctl.conf
Starting tuned: Traceback (most recent call last):
  File "/usr/sbin/tuned", line 92, in <module>
    tuned.init(TUNEDDIR, cfgfile, debug = debug)
  File "/usr/share/tuned/tuned.py", line 82, in init
    self.__initplugins__(path, "monitorplugins", self.mp)
  File "/usr/share/tuned/tuned.py", line 43, in __initplugins__
    exec _cmd
  File "<string>", line 1, in <module>
  File "/usr/share/tuned/monitorplugins/net.py", line 113, in <module>
    _plugin = NetMonitor()
  File "/usr/share/tuned/monitorplugins/net.py", line 41, in __init__
    max_speed = self.__calcspeed__( ethcard(d).get_max_speed() );
  File "/usr/share/tuned/tuned_nettool.py", line 221, in ethcard
    ethcard.list[interface] = Nettool(interface)
  File "/usr/share/tuned/tuned_nettool.py", line 40, in __init__
    self.update()
  File "/usr/share/tuned/tuned_nettool.py", line 197, in update
    self.supported_modes.append(1000, True)
TypeError: append() takes exactly one argument (2 given)
                                                           [FAILED]


Version-Release number of selected component (if applicable):

[root@hp-bl495cg5-02 default]# uname -a
Linux hp-bl495cg5-02.rhts.eng.bos.redhat.com 2.6.32-54.el6.x86_64 #1 SMP Wed
Jul 28 00:06:54 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

[root@hp-bl495cg5-02 default]# rpm -qi tuned
Name        : tuned                        Relocations: (not relocatable)
Version     : 0.2.11                            Vendor: Red Hat, Inc.
Release     : 6.el6                         Build Date: Wed 14 Jul 2010
11:54:18 AM EDT
Install Date: Tue 03 Aug 2010 05:04:39 AM EDT      Build Host:
x86-003.build.bos.redhat.com

RHEL6 version: RHEL6.0-20100730.5_ftp-Server-x86_64


How reproducible:
Install RHEL6
tuned-adm off
tuned-adm profile default

Steps to Reproduce:
[root@hp-bl495cg5-02 default]# tuned-adm list
Available profiles:
- desktop-powersave
- default
- throughput-performance
- laptop-battery-powersave
- latency-performance
- server-powersave
- laptop-ac-powersave
 
All profiles are failing EXCEPT  throughput-performance and latency-performance

Actual results:

Starting tuned: Traceback (most recent call last):
  File "/usr/sbin/tuned", line 92, in <module>
    tuned.init(TUNEDDIR, cfgfile, debug = debug)
  File "/usr/share/tuned/tuned.py", line 82, in init
    self.__initplugins__(path, "monitorplugins", self.mp)
  File "/usr/share/tuned/tuned.py", line 43, in __initplugins__
    exec _cmd
  File "<string>", line 1, in <module>
  File "/usr/share/tuned/monitorplugins/net.py", line 113, in <module>
    _plugin = NetMonitor()
  File "/usr/share/tuned/monitorplugins/net.py", line 41, in __init__
    max_speed = self.__calcspeed__( ethcard(d).get_max_speed() );
  File "/usr/share/tuned/tuned_nettool.py", line 221, in ethcard
    ethcard.list[interface] = Nettool(interface)
  File "/usr/share/tuned/tuned_nettool.py", line 40, in __init__
    self.update()
  File "/usr/share/tuned/tuned_nettool.py", line 197, in update
    self.supported_modes.append(1000, True)
TypeError: append() takes exactly one argument (2 given)
                                                           [FAILED]

Expected results:

No ERROR message.

Additional info:
Comment 2 Phil Knirsch 2010-08-03 05:37:50 EDT
Thanks for the report, Jiri.

I just checked and reproduced it here with a "fake" failure. The problem is when the network card doesn't provide a proper list of supported speeds and our parsing fails for it as a fallback we assume it's a 1gbit fullduplex card. Unfortunately we haven't hit that case and the line

    self.supported_modes.append(1000, True)

should actually read like

  self.supported_modes.append((1000, True))

It's fixed in git already and would be ready to go in, so clear Devel ACK from me.

Thanks & regards, Phil
Comment 3 Jiri Hladky 2010-08-03 05:56:04 EDT
Hi Phil,

thanks for the super-quick fix!!

Jirka
Comment 4 Jiri Hladky 2010-08-03 08:21:20 EDT
Hi Phil,

I have tested the fix and it works! :-)

Thanks
Jirka
Comment 5 Phil Knirsch 2010-08-03 12:00:02 EDT
Built done, setting to modified and added Fixed In Version.

Thanks & regards, Phil
Comment 8 releng-rhel@redhat.com 2010-11-12 08:43:49 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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