Bug 620686

Summary: tuned-adm profile default is failing
Product: Red Hat Enterprise Linux 6 Reporter: Jiri Hladky <jhladky>
Component: tunedAssignee: Phil Knirsch <pknirsch>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-daemons
Severity: urgent Docs Contact:
Priority: low    
Version: 6.0CC: asersen, benl, ddumas, jhladky, kkolakow, rvokal, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 13:43:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Hladky 2010-08-03 09:25:16 UTC
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 09:37:50 UTC
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 09:56:04 UTC
Hi Phil,

thanks for the super-quick fix!!

Jirka

Comment 4 Jiri Hladky 2010-08-03 12:21:20 UTC
Hi Phil,

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

Thanks
Jirka

Comment 5 Phil Knirsch 2010-08-03 16:00:02 UTC
Built done, setting to modified and added Fixed In Version.

Thanks & regards, Phil

Comment 8 releng-rhel@redhat.com 2010-11-12 13:43:49 UTC
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.