]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/start.c
cgfsng: add cgfsng_monitor_destroy()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 23 Sep 2018 18:11:56 +0000 (20:11 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 26 Sep 2018 12:11:47 +0000 (14:11 +0200)
commit434c8e15c9821bce65d3bc1eefae0ecfa843ef1e
treeb35e3c9fbd6608fd620453ccf2752036ab7dd700
parent3999f50bd2a86ad897fe267b99a676cc7a4a7fe8
cgfsng: add cgfsng_monitor_destroy()

Since we switched to the new cgroup scoping scheme that places the
container payload into lxc.payload/<container-name> and
lxc.monitor/<container-name> deletion becomes slightly more complicated.
The monitor will be able to rm_rf(lxc.payload/<container-name>) but will
not be able to rm_rf(lxc.monitor/<container-name>) since it will be
located in that cgroup and it will thus be populated.
My current solution to this is to create a lxc.pivot cgroup that only
exists so that the monitor process on container stop can pivot into it,
call rm_rf(lxc.monitor/<container-name>) and can then exit. This group
has not function whatsoever apart from this and can thus be shared by
all monitor processes.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c
src/lxc/cgroups/cgroup.h
src/lxc/start.c
src/lxc/start.h