[systemd-devel] how to set net_cls.classid cgroups argument for a service?

Andrew Gurinovich altmind at gmail.com
Wed Nov 27 10:12:54 UTC 2019


Do you have any extra reads to get a better idea why you consider net_cls
not a real cgroup?

Its generally used in iptables and tc traffic labeling an QoS.
Its a missing feature with an open issue that can be solved/eased in couple
of lines of code https://github.com/systemd/systemd/issues/11618
Are PR welcome for this kind of feature?


On Wed, Nov 27, 2019 at 3:25 AM Lennart Poettering <lennart at poettering.net>
wrote:

> On Di, 26.11.19 15:27, Andrew Gurinovich (altmind at gmail.com) wrote:
>
> > What is the recommended way to assign cgroups prop net_cls.classid to a
> > systemd service?
> > Seems that a rule of thumb that whatever service property that is
> supposed
> > to be systemd-managed, got a property in service file. However,
> > https://systemd.io/CGROUP_DELEGATION says that:
> >
> > >>This means systemd currently does not and will never manage the
> following
> > controllers on cgroup v1: freezer, cpuset, net_cls, perf_event, net_prio,
> > hugetlb.
> >
> > Do It mean I'm on my own and need to write a custom ExecStartPost shell
> > script to handle cgroups creation and cleanup myself just to change a
> > single cgroup argument?
>
> Yes.
>
> These controllers are not supported by systemd, and this will not
> change (at least for their cgroupsv1 implementations) even with
> current systemd versions. On cgroupsv2, we now support "cpuset"
> starting with the upcoming v244 of systemd, and "freezer" is currently
> pending as PR. The other 4 do not exist and have no future on cgroupsv2.
>
> Lennart
>
> --
> Lennart Poettering, Berlin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20191127/853a1146/attachment.html>


More information about the systemd-devel mailing list