[Lxc-users] lxc-destroy does not destroy cgroup

Arie Skliarouk skliarie at gmail.com
Tue Dec 20 08:15:53 UTC 2011


I don't have the /cgroup directory mounted. Somehow, the directory is
mounted automatically onto the /sys/fs/cgroup

*root at mf:~# df | grep cgroup
cgroup                12368328         0  12368328   0% /sys/fs/cgroup
root at mf:~# ls /sys/fs/cgroup/
blkio  cpu  cpuacct  cpuset  devices  freezer  memory  net_cls  perf_event*

Each subdirectory of the above contains directory per container with knobs
that are specific to the resource:

*root at mf:~# ls /sys/fs/cgroup/cpu/dev
cgroup.clone_children  cgroup.procs      cpu.rt_runtime_us
notify_on_release
cgroup.event_control   cpu.rt_period_us  cpu.shares         tasks
root at mf:~#*

Could well be this is because of the 3.0.0-12-server kernel. I don't see
how I can rename a stuck cgroup easily in this situation. Any advices?

BTW, I once had /cgroup mounted from fstab like this:

*none /cgroup cgroup defaults 0 0*

It grouped all settings into per-container directory nicely, but the server
failed to boot with that.

--
Arie




On Sun, Dec 18, 2011 at 22:23, Jérôme Petazzoni <
jerome.petazzoni at dotcloud.com> wrote:

>  On 12/18/2011 11:56 AM, C Anthony Risinger wrote:
>
> On Dec 18, 2011 1:09 PM, "Jérôme Petazzoni" <jerome.petazzoni at dotcloud.com>
> wrote:
> >
> > If that happens, just try to terminate the other processes running in
> the cgroup, rename it ("mv /cgroup/mylittlecontainer /cgroup/broken") and
> restart it.
> > This saved me a few reboots already :-)
>
> You should be able to remove an empty cgroup with `rmdir`.
>
>
> Sorry, I forgot to mention:
> - if you can't remove the cgroup because it's not empty,
> - if the process remaining in the cgroup cannot be killed (for instance,
> because it's in "uninterruptible sleep" state),
> - if you can't move the said process in a different cgroup (with e.g.
> "echo $PID > /cgroup/othercgroup/tasks"),
> - ... then you can still rename the old cgroup.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20111220/70aa2988/attachment.html>


More information about the lxc-users mailing list