[pkg-lxc-devel] Bug#1118768: Bug#1118768: lxc-templates: included config file has config for cgroup1 on a cgroup2 system

Richard Hector richard at richardhector.co.nz
Tue Oct 28 01:13:47 GMT 2025


On 27/10/2025 12:22, Mathias Gibbens wrote:
> Hi Richard,
> 
> On Sat, 2025-10-25 at 15:31 +1300, Richard Hector wrote:
>> I believe these are for cgroup1 systems, but these files are still
>> being installed on cgroup2 systems.
> 
>    cgroup v1 was supported by systemd through version 257, which is what
> shipped in trixie. As such, we should keep cgroup v1 entries even
> though they may not see much use on "current" systems. As you note
> below, a warning may be generated, but I think that's OK as there's no
> impact on the running containers.

Ok.

>> I'm no expert, but I suspect that's the reason for these warnings:
>> 
>> lxc max-wp1 20241104110429.560 WARN     cgfsng - ../src/lxc/cgroups/cgfsng.c:cgfsng_setup_limits_legacy:3155 - Invalid argument - Ignoring legacy cgroup limits on pure cgroup2 system
>> 
>> That may be just a warning, but presumably this is ineffective, and
>> there should be equivalent cgroup2 lines somewhere?
> 
>    The packaging of lxc-templates for trixie includes corresponding
> cgroup v2 rules in /usr/share/lxc/config/debian.common.conf.

My apologies - I saw the cgroup v1 stuff, and never bothered to scroll 
down to the rest of the file.

I guess if there was a bug, it was in pre-trixie systems, which nobody 
will want to fix now. So this can probably be closed.

>> I'm still running bookworm, but I checked the trixie package, and
>> that file has the same entries in it.
> 
>    lxc-templates is considered deprecated in favor of distrobuilder by
> upstream. I expect that lxc-templates will be removed during the
> forky+1 development cycle. However, if you would like to make
> improvements (such as removing cgroup v1 rules for the forky release),
> please feel free to do so. I would suggest starting be looking at some
> of the Debian-specific patches, then working to get any relevant
> changes merged into the upstream project. That will benefit all
> distros, and will be easy to incorporate into packaging updates for
> Debian.

I guess the main thing is keeping existing containers running that were 
installed on older systems, after upgrades of the host. But that's 
probably a different topic, and belongs in a different bug, if any.

Many thanks,
Richard



More information about the Pkg-lxc-devel mailing list