[systemd-devel] Cgroups v2 delegation on a session scope

Lennart Poettering lennart at poettering.net
Mon Feb 4 11:48:54 UTC 2019


On Mo, 04.02.19 13:34, Mantas Mikulėnas (grawity at gmail.com) wrote:

> > That suggests your dbus configuration is borked? Normally the user's
> > dbus-daemon instance should listen on that socket.
>
> Well, not all distros (e.g. Debian) ship user-bus by default... But if
> systemctl --user is able to use the private socket for everything else,
> what prevents it from being used with --pipe?

--wait and the modes that connect to the invoking stdin/stdout mean
that systemd-run refs/unrefs explicitly it allocates, so that their
exit status doesn't get flushed before we can read them. But ref/unref
currently only works via the bus, since it's built on tracking peer
addresses, which is not a concept that exists on direct dbus
connections.

Quite frankly, running a per-session dbus with a per-user systemd is
not supported. You are in a lot of pain if you try anyway.

Turn off per-user systemd if you want, and then per-user dbus with
it. But one without the other is just broken. It's going to break here
and everywhere else too.

The interface to talk to systemd with is the bus. Yes, it has a
limited functionality direct API too, but it's useful for a smaller
subset only, and its primary job is to act as emergency IPC if the
real IPC is not available only, i.e. to exit the session if things are
fucked. You should not use it for regular codepaths.

Lennart

--
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list