[Lxc-users] can't restart container without rebooting entire host, because can't delete cgroups files, tasks is 0

Brian K. White brian at aljex.com
Fri Nov 5 22:26:40 UTC 2010


On 11/5/2010 4:20 PM, Serge E. Hallyn wrote:
> Quoting Brian K. White (brian at aljex.com):
>> I don't know how to track down if there is possibly some process that is
>> part of the cgroup even though lxc-ps doesn't show any.
>> Examine every single process and verify that it's part of the host or
>> another container until I find one I can't account for?
>
> Does find /cgroup -name tasks -print0 | xargs cat show anything?
>

It shows a bezillion things, but what does that prove?

Did you mean just for the bad container?

find /cgroup/nj10-014 -name tasks -print0 | xargs -0 cat
produces no output.

This is a clearer picture:

nj9:~ # find /cgroup/nj10-014 -name tasks -print0 | xargs -t0n1 cat
cat /cgroup/nj10-014/19237/3/tasks
cat /cgroup/nj10-014/19237/2/tasks
cat /cgroup/nj10-014/19237/tasks
cat /cgroup/nj10-014/19206/3/tasks
cat /cgroup/nj10-014/19206/2/tasks
cat /cgroup/nj10-014/19206/tasks
cat /cgroup/nj10-014/19064/3/tasks
cat /cgroup/nj10-014/19064/2/tasks
cat /cgroup/nj10-014/19064/tasks
cat /cgroup/nj10-014/19061/2/tasks
cat /cgroup/nj10-014/19061/tasks
cat /cgroup/nj10-014/19056/2/tasks
cat /cgroup/nj10-014/19056/tasks
cat /cgroup/nj10-014/16826/2/tasks
cat /cgroup/nj10-014/16826/tasks
cat /cgroup/nj10-014/16818/2/tasks
cat /cgroup/nj10-014/16818/tasks
cat /cgroup/nj10-014/6363/2/tasks
cat /cgroup/nj10-014/6363/tasks
cat /cgroup/nj10-014/6360/2/tasks
cat /cgroup/nj10-014/6360/tasks
cat /cgroup/nj10-014/2845/2/tasks
cat /cgroup/nj10-014/2845/tasks
cat /cgroup/nj10-014/2842/2/tasks
cat /cgroup/nj10-014/2842/tasks
cat /cgroup/nj10-014/tasks
nj9:~ #

nj9:~ # find /cgroup/nj10-014 -name tasks -print0 | xargs -0 ls -l
-rw-r--r-- 1 root root 0 2010-11-03 09:36 /cgroup/nj10-014/16818/2/tasks
-rw-r--r-- 1 root root 0 2010-11-03 09:36 /cgroup/nj10-014/16818/tasks
-rw-r--r-- 1 root root 0 2010-11-03 09:38 /cgroup/nj10-014/16826/2/tasks
-rw-r--r-- 1 root root 0 2010-11-03 09:38 /cgroup/nj10-014/16826/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:38 /cgroup/nj10-014/19056/2/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:38 /cgroup/nj10-014/19056/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:38 /cgroup/nj10-014/19061/2/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:38 /cgroup/nj10-014/19061/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:38 /cgroup/nj10-014/19064/2/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:38 /cgroup/nj10-014/19064/3/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:38 /cgroup/nj10-014/19064/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:40 /cgroup/nj10-014/19206/2/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:40 /cgroup/nj10-014/19206/3/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:40 /cgroup/nj10-014/19206/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:40 /cgroup/nj10-014/19237/2/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:40 /cgroup/nj10-014/19237/3/tasks
-rw-r--r-- 1 root root 0 2010-11-03 15:40 /cgroup/nj10-014/19237/tasks
-rw-r--r-- 1 root root 0 2010-11-01 18:27 /cgroup/nj10-014/2842/2/tasks
-rw-r--r-- 1 root root 0 2010-11-01 18:27 /cgroup/nj10-014/2842/tasks
-rw-r--r-- 1 root root 0 2010-11-01 18:27 /cgroup/nj10-014/2845/2/tasks
-rw-r--r-- 1 root root 0 2010-11-01 18:27 /cgroup/nj10-014/2845/tasks
-rw-r--r-- 1 root root 0 2010-11-01 22:06 /cgroup/nj10-014/6360/2/tasks
-rw-r--r-- 1 root root 0 2010-11-01 22:06 /cgroup/nj10-014/6360/tasks
-rw-r--r-- 1 root root 0 2010-11-01 22:08 /cgroup/nj10-014/6363/2/tasks
-rw-r--r-- 1 root root 0 2010-11-01 22:08 /cgroup/nj10-014/6363/tasks
-rw-r--r-- 1 root root 0 2010-11-01 18:04 /cgroup/nj10-014/tasks
nj9:~ #

!!!!! wait, you are saying just ignore the fact that there are files in 
the directories and try to remove the directories, uh directly?

nj9:~ # find /cgroup/nj10-014 -type d -delete
nj9:~ # ls -lR /cgroup/nj10-014
ls: cannot access /cgroup/nj10-014: No such file or directory


!!!! It never even slightly occured to me to try that!!!!!

Thanks! Now I know what to put in the release agent too. Awsome. Thanks 
again.

-- 
bkw




More information about the lxc-users mailing list