[PATCH 0/5] Support service activation through Upstart
Scott James Remnant
scott at netsplit.com
Thu Dec 23 06:54:08 PST 2010
On Thu, Dec 23, 2010 at 12:35 PM, Thiago Macieira <thiago at kde.org> wrote:
> On Thursday, 23 de December de 2010 12:28:41 Lennart Poettering wrote:
>> Now after all that you do want this kind of activation hookup for
>> upstart too, and now want to litter the D-Bus source code with multiple
>> implementations which happen to be almost entirely identical except that
>> a few strings are named differently.
> That sounds like the activation protocol should be made part of D-Bus (not of
> systemd or upstart), with strings starting with "org.freedesktop.DBus".
I think that makes far more sense in the long-term, I'd be more than
happy to support such a thing in Upstart. We should make sure the
protocol is flexible enough that it doesn't limit implementations to
one particular way of working.
Obviously this protocol should require the Init daemon be connected to
the bus, how would such an init daemon register with the bus daemon?
Would it call a method and pass in its own well-known name, and an
object path? I guess we'd have the object path implement the
org.freedesktop.DBus.Activation interface or similar?
What form will the activation take? To me it makes most sense that
it's a method call from bus to init daemon, since then you get all the
usual method call semantics including a reply when the init daemon
believes its ready (though the bus may want to wait for the appearance
of the bus name) and error replies.
But to Lennart I think it made more sense for it to be a Signal, I'm
not sure of his rationale - Lenny? One advantage would be that you
could just broadcast such a thing, but then you have no guarantee of a
returning error, etc.
Either way, we'd need to agree the message content. One obvious
difference between Upstart and systemd is that in Upstart D-Bus
services are activated by bus name, whereas in systemd they are
activated by the value of the SystemdService= member.
Other init daemons might foreseeably want other members of the
activation file? Perhaps the right approach would be to include all
of the members of the ini file in the message so that the init daemon
can make its own call as to which it uses. (It might not even have
its own configuration, it might simply use the Exec= line itself).
Lenny, would you be happy to move the activation protocol definition
into the D-Bus Spec and implement that in systemd as well?
More information about the dbus