[PATCH 0/5] Support service activation through Upstart
mzqohf at 0pointer.de
Fri Dec 24 00:10:08 PST 2010
On Fri, 24.12.10 01:16, Scott James Remnant (scott at netsplit.com) wrote:
> On Thu, Dec 23, 2010 at 3:28 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
> > On Thu, 23.12.10 14:54, Scott James Remnant (scott at netsplit.com) wrote:
> >> Lennart, would you be happy to move the activation protocol definition
> >> into the D-Bus Spec and implement that in systemd as well?
> > Scotty, no I don't think we should do that. The D-Bus spec exists to
> > allow reimplementation of compatible clients or servers for the D-Bus
> > proocol and for that describes the interaction between clients and
> > servers. However, the activation stuff is an interface between one
> > particular implementation of the server, and one or two particular
> > implementations of init systems. I think it would be smart to leave this
> > a private protocol between three parties instead of declaring it
> > something super-official that is useable for everybody else too which
> > would greatly complicate changing it. And that is actually something
> > very much in your own interest I believe.
> Do you think that this is a protocol the two of us could document and
> share? In which case where would you think would be the best "home"
> for that protocol? I'd assumed org.freedesktop.DBus made the most
> sense. This would seem to encourage additional implementations, which
> you seem to be against?
> Alternatively since we do activation slightly differently (systemd by
> service name, upstart by dbus name), and discouraging additional
> implementations of init systems is considered a win, would it be so
> bad if we just had slightly different protocols here?
I think it would make sense to extend the .service syntax with two options:
and then make SystemdService=xxx an alias for ActivationString=xxx.
Setting ActivationByManager=true would cause activation messages to be
sent to systemd/upstart, and unless ActivationString=xxx is set it
string in the message would be he service name. If you set
ActivationString=xxx then you'd override this string. If you only set
ActivationString=xxx or SystemdService=xxx (for compat) then
ActivationByManager=true would be implied.
This way, systemd and upstart would use exactly the same protocol.
It probably makes sense though and to extend things maybe like this:
i.e. by reusing the locale-syntax of .desktop files we could allow
different settings depending on which manager is used.
Lennart Poettering - Red Hat, Inc.
More information about the dbus