Bug 647107

Summary: cgconfigparser does not properly parse the multi-line variables
Product: [Fedora] Fedora Reporter: Ivana Varekova <varekova>
Component: libcgroupAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 19CC: dhaval.bugzilla, jsafrane, varekova
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libcgroup-0.38-7.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1036355 1142807 (view as bug list) Environment:
Last Closed: 2015-02-18 11:15:22 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:
Bug Depends On:    
Bug Blocks: 1036355, 1138209    

Description Ivana Varekova 2010-10-27 08:45:00 UTC
Description:
cgconfigparser does not properly parse the multi-line variables

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

How reproducible:
use configuration file:

# Configuration file generated by cgsnapshot
mount {
	devices = /cgroup/1;
}
group pom {
	devices {
		devices.deny="a *:* rwm";
		devices.allow="a *:* w
c 8:* r";
	}
}


Steps to Reproduce:
1. # cgconfigparser -l conf file
2. # cat //cgroup/1/pom/devices.list 
a *:* rwm

3. # echo "a *:* rwm" > /cgroup/1/pom/devices.deny
   # echo "" > /cgroup/1/pom/devices.allow
   # echo "a *:* w" > /cgroup/1/pom/devices.allow
   # echo "c 8:* r" > /cgroup/1/pom/devices.allow
4. # cat //cgroup/1/pom/devices.list 
a *:* rwm
c 8:* r
  
Actual results:
# cat //cgroup/1/pom/devices.list 
a *:* rwm

Expected results:
# cat //cgroup/1/pom/devices.list 
a *:* rwm
c 8:* r

Comment 1 Jan Safranek 2010-11-02 13:05:09 UTC
cgconfigparser parses the config file correctly, but it writes whole multi-line value in single write() call, while the 'devices' kernel subsystem expects only one line per write().

I can add specific hack e.g. to cg_set_control_value() to split devices.allow and devices.deny values to multiple write() calls, but... it's just ugly. We will end with dozens such hacks in various places, we already have plenty in cgsnapshot. Is there any chance of fixing kernel to accept the values it provides?

Comment 2 Jan Safranek 2010-11-02 15:08:35 UTC
I've filled new kernel bug #648943 for this, let's see what they can do...

Comment 3 Fedora Admin XMLRPC Client 2011-06-22 17:13:59 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2011-11-21 14:27:53 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Ivana Varekova 2012-07-18 09:47:44 UTC
The kernel part seems to be fixed in 3.4.4-5.fc17.

Comment 6 Fedora End Of Life 2013-04-03 20:13:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 7 Fedora Admin XMLRPC Client 2014-02-03 09:43:01 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Jan Chaloupka 2014-08-05 10:30:10 UTC
As from upstream, libcgroup is designed to set every attribute atomically. Thus every patch would require one write per each line of multi-line variable.

Comment 10 Fedora Update System 2014-09-23 09:55:40 UTC
libcgroup-0.41-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libcgroup-0.41-6.fc21

Comment 11 Fedora Update System 2014-09-23 09:56:26 UTC
libcgroup-0.38-9.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libcgroup-0.38-9.fc20

Comment 12 Fedora Update System 2014-09-23 10:00:43 UTC
libcgroup-0.38-7.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libcgroup-0.38-7.fc19

Comment 13 Fedora Update System 2014-09-25 10:33:21 UTC
Package libcgroup-0.38-9.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libcgroup-0.38-9.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-11355/libcgroup-0.38-9.fc20
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2014-10-08 18:53:52 UTC
libcgroup-0.41-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora End Of Life 2015-01-09 22:37:24 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 16 Fedora End Of Life 2015-02-18 11:15:22 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.