Eric van Blokland changed bug 1183247
What Removed Added
Attachment #862186 is obsolete   1
Flags needinfo?(ericvanblokland@gmail.com)  

Comment # 36 on bug 1183247 from
Created attachment 862326 [details]
[PATCH] cgroup/LXC: Do not condition availability of v2 by  controllers

So if I understand correctly, in hybrid cgroups the scope needs to be set using
V2 for systemd. However, libvirt/lxc treats V2 as unavailable if there are no
controllers.

Your patch does not work out of the box. It fails in virCgroupV2BindMount when
it tries to create the directory (g_mkdir_with_parents)
"/sys/fs/cgroup/unified". Which makes sense to me on a read-only file system. 
If I make the errors in this function non-fatal, everything seems to work as
expected.

If I make virCgroupBindMount do the binds in reverse order (V2 has precedence
over V1) virCgroupV2BindMount succeeds without modifications. That may seem a
bit dirty, but to me it's less convoluted than letting V2 be aware it should be
mounted within V1.

I've tested this patch with hybrid and unified cgroups, but not without
systemd.


You are receiving this mail because: