[systemd-devel] Cgroups v2 delegation on a session scope
Nick Zavaritsky
mejedi at gmail.com
Sun Feb 3 09:50:27 UTC 2019
Dear systemd developers!
I want to develop something using raw cgroups api, hence I wish to enable cgroup delegation on my login session scope (feels like the most convenient option).
I am running systemd 237, and I have legacy cgroups disabled (cgroup_no_v1=all systemd.unified_cgroup_hierarchy in my kernel boot args).
I was unable to figure out how to enable cgroups delegation on a session scope, could you please provide some pointers?
I’ve also tried a few workarounds that came to my mind, but surprisingly it didn’t work either.
In particular, systemctl set-property apparently is unaware of Delegate= option.
Systemd-run —user almost worked (I had to edit /lib/systemd/system/user at .service to enable all available controllers on a subtree, my distribution defaults to memory, pids).
Unfortunately, systemd-run doesn’t work if I pass —pipe flag.
It fails with 'Failed to create bus connection: No such file or directory’ message. According to strace, without —pipe it goes for /run/user/1000/systemd/private which works, otherwise /run/user/1000/bus is attempted, producing ENOENT.
Best,
Nickz
More information about the systemd-devel
mailing list