[systemd-devel] Two services allocated for the same bus name ...

Lennart Poettering lennart at poettering.net
Wed Oct 14 07:29:34 PDT 2015


On Sat, 10.10.15 20:09, Johannes Ernst (johannes.ernst at gmail.com) wrote:

> I’m trying to set up two different Avahi configurations, using foo.service and bar.service.
> 
> Error message:
> 
> Two services allocated for the same bus name org.freedesktop.Avahi, refusing operation.
> 
> On the face of it, that seems to be correct: indeed foo.service and bar.service both declare
> 
> [Service]
> Type=dbus
> BusName=org.freedesktop.Avahi
> 
> However, I have in foo.service:
> 
> [Unit]
> Conflicts=bar.service
> 
> and vice versa, so they will never be active at the same time. Is
> there some way to make this work? [I don’t know who might want to
> talk to Avahi via dbus, but it makes sense that they should find
> either foo or bar, depending on which configuration is currently up,
> so I don’t really want to rename this]

This has come up before. We indeed disallow two units for the same bus
name. This is because Type=dbus units (which BusName= is primarily
for) bind the unit state to the appearance of the name on the bus, and
as names can be owned by one bus peer only we want to clearly know
which unit that maps to.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list