Bug 652583 - cgclear returns error output even if it works ok
Summary: cgclear returns error output even if it works ok
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libcgroup
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Dhaval Giani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-12 09:31 UTC by Ivana Varekova
Modified: 2010-12-13 13:38 UTC (History)
4 users (show)

Fixed In Version: libcgroup-0.37-1.fc15.x86_64
Clone Of:
Environment:
Last Closed: 2010-12-13 13:38:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
strace of the relevant cgclear command (5.81 KB, application/octet-stream)
2010-11-12 09:47 UTC, Ivana Varekova
no flags Details
proposed fix (835 bytes, patch)
2010-11-12 11:21 UTC, Dhaval Giani
no flags Details | Diff

Description Ivana Varekova 2010-11-12 09:31:13 UTC
Description of problem:
cgclear command return an error value if it finish the unmounting and there was a subdirectory in the directory to which the control group was mounted.

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

Steps to Reproduce:
1. mkdir /mnt/cgroups/cpu
2. mkdir /mnt/cgroups/cpu/pom
3. mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
4. cgclear
cgclear failed with Directory not empty

but the cgclear command was successful:
5. lscgroup
cgroups can't be listed: Cgroup is not mounted
  
Actual results:
$ cgclear
cgclear failed with Directory not empty

Expected results:
$ cgclear

Comment 1 Ivana Varekova 2010-11-12 09:44:24 UTC
more verbose example (with the output of /proc/cgroups content):
++ mkdir /mnt/cgroups/cpu
++ mkdir /mnt/cgroups/cpu/pom
++ mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
++ cat /proc/cgroups
#subsys_name	hierarchy	num_cgroups	enabled
cpuset	0	1	1
ns	0	1	1
cpu	9	1	1
cpuacct	0	1	1
memory	0	1	1
devices	0	1	1
freezer	0	1	1
net_cls	0	1	1
blkio	0	1	1
++ cgclear
cgclear failed with Directory not empty
++ cat /proc/cgroups
#subsys_name	hierarchy	num_cgroups	enabled
cpuset	0	1	1
ns	0	1	1
cpu	0	1	1
cpuacct	0	1	1
memory	0	1	1
devices	0	1	1
freezer	0	1	1
net_cls	0	1	1
blkio	0	1	1

Comment 2 Ivana Varekova 2010-11-12 09:47:08 UTC
Created attachment 459997 [details]
strace of the relevant cgclear command

strace of the relevant cgclear command

Comment 3 Dhaval Giani 2010-11-12 11:21:28 UTC
Created attachment 460018 [details]
proposed fix

Does this do the job?


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