[systemd-devel] Cgroups v2 delegation on a session scope (Solved)
Nick Zavaritsky
mejedi at gmail.com
Mon Feb 4 13:31:09 UTC 2019
Hi Lennart,
After I’ve installed dbus-user-session package, systemd-run works with —pipe flag and I can finally have a delegated cgroups scope.
Thank you very much for your help!
Cheers,
Nick
> On Feb 4, 2019, at 1:38 PM, Nick Zavaritsky <mejedi at gmail.com> wrote:
>
>> On Feb 4, 2019, at 12:28 PM, Lennart Poettering <lennart at poettering.net> wrote:
>> On So, 03.02.19 10:50, Nick Zavaritsky (mejedi at gmail.com) wrote:
>>
>>> I was unable to figure out how to enable cgroups delegation on a
>>> session scope, could you please provide some pointers?
>>
>> You currently cannot. […]
>> However, even if we add that, this would not realistically work: on
>> cgroupsv2 inner nodes cannot contain processes.
>
> Point taken. For a developer workflow — writing code that takes advantage of cgroups api, running tests, and debugging it — systemd-run approach works just fine.
>
>> Hmm? What's the command line you are using in detail?
>
> $ systemd-run --user --tty id
> Failed to create bus connection: No such file or directory
>
>>> 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.
>>
>> That suggests your dbus configuration is borked? Normally the user's
>> dbus-daemon instance should listen on that socket.
>
> Any suggestions on how to fix it (ubuntu)? I am ssh-ing into a VM without graphical window environment.
>
> $ env | grep XDG
> XDG_SESSION_ID=1
> XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
> XDG_RUNTIME_DIR=/run/user/1000
>
> Should I add dbus-daemon as a service to my user service scope?
More information about the systemd-devel
mailing list