On 8/31/21 3:40 PM, Santiago Ruano Rincón wrote:
> El 31/08/21 a las 14:45, Thomas Goirand escribió:
>> Hi Santiago,
>>
>> Thanks for this bug report, I'll be working on it.
> 
> Thanks!
> 
>>
>> On 8/30/21 5:19 PM, Santiago Ruano Rincón wrote:
>>> To know if cgroup v2 is supported, one way is to
>>> `grep cgroup2 /proc/mounts`
>>
>> I am really unsure about this. On Bullseye, for example, we do have
>> cgroup2 mounted just like in Sid, though the new syntax wont work. What
>> we need here is a way to tell what version of the cgset/cgcreate
>> userland binary is there, preferably with something distribution agnostic...
> 
> Mmm, you need to make sure of two things: 1) the version of cgroup fs
> available in the system, and 2) the version of cgroup-tools (which is
> independent of 1)). You can install cgroup-tools without
> mounting any cgroup file system, so I don't think knowing the version of
> cgset/cgcreate is a fully reliable solution.
> 
> For 2), I'd prefer a versioned Depends on cgroup-tools (>= 2.0-2).

That's not what I'm looking for. I'm looking for a way, in the upstream
Cinder, to detect what's going on. So this cannot be Debian (or any
other OS) specific.

>> Maybe the only way is to just attempt the old style cgset, see if it
>> fails, and if it does, do v2 style cgset?
> 
> For 1), I'd chose to test v2 first, and then v1. Remember that v1 is not
> mounted by default.

Yeah, definitively, the mounted cgroups needs to be tested too...

> If you can propose a better way, I am all ears.

Unfortunately, cgcreate / cgset don't output their version with -v :/

Thomas

Reply via email to