Bug 885500 - tuned ConfigParser use is broken when key contains ":"
Summary: tuned ConfigParser use is broken when key contains ":"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: tuned
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-09 21:12 UTC by Fabrice Bellet
Modified: 2013-02-14 10:10 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-14 10:10:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
use configobj to parse config file (2.48 KB, patch)
2012-12-09 21:12 UTC, Fabrice Bellet
no flags Details | Diff
Another fix (1.25 KB, patch)
2012-12-10 10:04 UTC, Jaroslav Škarvada
no flags Details | Diff

Description Fabrice Bellet 2012-12-09 21:12:32 UTC
Created attachment 660439 [details]
use configobj to parse config file

recent tuned profiles have a [sysfs] section, where key,value couples are wrongly parsed by ConfigParser. This module allows both '=' and ':' to be a valid separator, which causes problems with entries like this one:

#Runtime PM for PCI Device NEC Corporation uPD720200 USB 3.0 Host Controller
/sys/bus/pci/devices/0000:0e:00.0/power/control=auto

key=/sys/bus/pci/devices/0000
and value=0e:00.0/power/control=auto

A possible solution is to switch to configobj instead, which works as expected, with minimal modifications to the code.

Comment 1 Jaroslav Škarvada 2012-12-10 10:04:21 UTC
Created attachment 660676 [details]
Another fix

Thanks for spotting this.

Added alternate patch, that doesn't require python-configobj dep.

Comment 2 Jaroslav Škarvada 2012-12-10 10:37:51 UTC
I took your patch, thanks. We will use the configobj parser to extend/clean the code for e.g. type verification.

Upstream commit:
https://fedorahosted.org/tuned/changeset/677458c174194a777aaed089ac084f826c47d1a7

Comment 3 Fedora Admin XMLRPC Client 2013-02-04 21:44:50 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Jaroslav Škarvada 2013-02-14 10:10:46 UTC
This should be fixed in tuned-2.1.2, the current version in f18 is tuned-2.2.0-1.fc18. Thus I think this is already fixed. If the problem persists feel free to reopen.


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