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

Daniel Lezcano daniel.lezcano at free.fr
Mon Nov 8 14:25:41 UTC 2010


On 11/05/2010 09:27 PM, Serge E. Hallyn wrote:
> Quoting Miroslav Lednicky (lednicky at avonet.cz):
>    
>> Hello,
>>
>> 	it is the same problem as I have may be:
>>
>> http://sourceforge.net/mailarchive/forum.php?thread_name=4CD297E2.2030806%40avonet.cz&forum_name=lxc-users
>>
>> I don't know what can I do with it.
>>
>> Server reboot is necessary ...
>>      
> I fired off a container and did a bunch of ns_exec's under it to create
> some cgroup subdirectories.  When I powered off the container, lxc did
> indeed complain about not being able to remove /cgroup/ubuntu1.  I did
>
> 	find /cgroup/ubuntu1 -type d -print0 | xargs -0 rmdir
>
> which deleted the subdirectories and complainted about not being able
> to remove ubuntu1 itself.  Then I did 'rmdir /cgroup/ubuntu1' and it
> worked.
>
> So the only problem with my find statement is that it doesn't work
> depth-first, so you might have to do it a few times to get all of the
> subdirectories.
>
> Daniel, I think it would be worthwhile for lxc, on exiting a container,
> to do a depth-first search or all directories under the container's
> cgroup, and rmdir them all.  What do you think?
>    

Yep, agree.





More information about the lxc-users mailing list