[PATCH 0/5] Support service activation through Upstart

Lennart Poettering mzqohf at 0pointer.de
Sat Dec 25 06:56:08 PST 2010


On Fri, 24.12.10 17:54, Colin Walters (walters at verbum.org) wrote:

> 
> On Wed, Dec 22, 2010 at 10:27 AM, Scott James Remnant
> <scott at netsplit.com> wrote:
> > These patches add support for service activation through Upstart.
> 
> What do you guys think about having DBus just try every activation
> request through init first?  In other words, we send a message like:
> 
> org.freedesktop.Init.TryToActivateDesktopFile
> string:/usr/share/dbus-1/system-services/foo.desktop
> 
> and init replies "yes", "no", "error".   Actually even better, init
> just always handles launching a task like this, and if there isn't a
> corresponding native item (upstart job, unit file, whatever), init
> just make one up.
> 
> It's not functionally different from dbus launching it really.

Well, we thought about teaching systemd to read native D-Bus service
files. However for a variety of reasons we decided not to do this. One
thing is that it is kinda messy due to the location on disk, i.e. since
it is currently on /usr, it is not possible to include it in the
calculation of the initial transaction. Of course, we could fix this by
declaring seperate /usr obsolete, or by moving all those files to
/lib/dbus or so, but that's political work I am not keen to deal with,
unless I really have to.

Also, it is definitely our intention to make people move to systemd
.service files all across the board, and transparently supporting D-Bus
.service files from within systemd wouldn't really help. While
supporting SysV for a longer time is inevitable I think it is much
easier to move most D-Bus services to native systemd files in finite
time. 

We also thought of getting rid of D-Bus service files entirely and
replace them completely with systemd service files, but that is really
hard since D-Bus reads all services files on boot-up and is able to
offer a list of bus-activatable services to clients. systemd is
optimized never to load unreferenced service files, so things are
fundamentally incompatible here in regards to enumertion of
services. The current tandem of D-Bus serivce files AND systemd service
files for the same services is suboptimal, but appeared the most
sensible thing for now, especially during the transition period where
non-systemd systems are still common and matter. I think as soon as
sysvinit and Upstart have been phased out on most distros we can rethink
what we can do in this area.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the dbus mailing list