Bug 1348874

Summary: libcgroup - Order of mem values after cgsnapshot results in "Failure to remove non-empty group" on start.
Product: [Fedora] Fedora Reporter: Nikola Forró <nforro>
Component: libcgroupAssignee: Nikola Forró <nforro>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: urgent    
Version: rawhideCC: cye, fkrska, jchaloup, jsafrane, lilu, mkolaja, mkolbas, nforro, ovasik, varekova
Target Milestone: ---Keywords: Patch, Reproducer
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libcgroup-0.41-9.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1315543 Environment:
Last Closed: 2016-07-01 12:50:43 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:
Bug Depends On: 1315543    
Bug Blocks:    
Attachments:
Description Flags
api.c: fix order of memory subsystem parameters generated by cgsnapshot none

Description Nikola Forró 2016-06-22 09:00:11 UTC
+++ This bug was initially created as a clone of Bug #1315543 +++

Description of problem:

 Setting memory.limit_in_bytes and memory.memsw.limit_in_bytes, and
 then using cgsnapshot -f, results in a file that causes the
 cgconfigparser to fail, due to the their ordering in the file:

 > Failed to remove a non-empty group Failed to parse /etc/cgconfig.conf or /etc/cgconfig.d

 It is either that cgsnapshot should not output entries in the
 incorrect order, or that this should not fail when checked or loaded.


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

 libcgroup-0.41-8.fc24


Additional info:

 Swapping each set of lines to be the following will allow it to load:

                memory.limit_in_bytes="...";
                memory.memsw.limit_in_bytes="..."

 ------------------------------------------------------------
 # service cgconfig restart
 Stopping cgconfig service:                                 [  OK  ]
 Starting cgconfig service:                                 [  OK  ]
 ------------------------------------------------------------

Comment 1 Nikola Forró 2016-06-22 09:03:22 UTC
Created attachment 1170640 [details]
api.c: fix order of memory subsystem parameters generated by cgsnapshot