FS#31470 - [avahi] Missing symlink to avahi-daemon.service

Attached to Project: Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Saturday, 08 September 2012, 16:34 GMT
Last edited by Gaetan Bisson (vesath) - Wednesday, 10 October 2012, 02:13 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I guess, "dbus-org.freedesktop.Avahi.service" should be a symlink to "avahi-daemon.service" (in /usr/lib/systemd/system), otherwise if some service like cups request it via dbus activation and avahi-daemon is not "enabled" will fail:

--
Sep 08 13:17:05 gerardo dbus[336]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
Sep 08 13:17:05 gerardo dbus-daemon[336]: dbus[336]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.
Sep 08 13:17:05 gerardo dbus[336]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.
--

creating a symlink (in /usr/lib/systemd/system) activation via dbus works without needed to enabling such service:

--
Sep 08 13:18:04 gerardo dbus-daemon[336]: dbus[336]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
Sep 08 13:18:04 gerardo dbus[336]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
--
This task depends upon

Closed by  Gaetan Bisson (vesath)
Wednesday, 10 October 2012, 02:13 GMT
Reason for closing:  No response
Additional comments about closing:  not sure what to do, upstream says nothing ==> do nothing
Comment by Dave Reisner (falconindy) - Saturday, 08 September 2012, 16:47 GMT
Hmm, this should already happen. avahi-daemon.service is correctly written and has "Alias=dbus-org.freedesktop.Avahi.service" in the [Install] section. enabling avahi-daemon.service should create this extra symlink. I guess the problem is when avahi-daemon.service isn't enabled and you rely solely on dbus activation.
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 08 September 2012, 16:56 GMT
Maybe doing such thing is wrong,

1) Suspose that there are no other services that needs avahi-daemon so you start avahi-daemon.service manually
2) Try to systemctl stop avahi-daemon.service, and avahi-daemon.service is reloaded again.
--
Warning: Stopping avahi-daemon.service, but it can still be activated by:
avahi-daemon.socket
Job canceled.
--
3) but if symlink does not exist, avahi-daemon is not reloaded when trying to stop (because of not such file or directory) BUG? so job is not canceled:
--
Warning: Stopping avahi-daemon.service, but it can still be activated by:
avahi-daemon.socket
--
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 08 September 2012, 16:59 GMT
bah, is like if you enable avahi-daemon and try to stop it, is reloaded and reloaded, the only way to stop it is: mask, stop, unmask...

or I am missing some concept?
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 08 September 2012, 17:03 GMT
@Dave: exactly, but such thing is supposed to work or not?, i.e. colord is not enabled but is automatically started by dbus activation when start cups (because requested unit name exists)
Comment by Dave Reisner (falconindy) - Saturday, 08 September 2012, 17:03 GMT
I don't really understand why you'd want to start it manually. Reading the unit file again, enabling it won't actually start the daemon on bootup -- just prime it for activation via socket or dbus.

On the other hand, manually starting it will start avahi-daemon.socket because of the Requires= (this part seems a bit odd to me). Does avahi have some sort of timeout mechanism where it will shutdown if inactive for a while?
Comment by Dave Reisner (falconindy) - Saturday, 08 September 2012, 17:07 GMT
colord seems to be a different case... It has valid dbus services in /usr/share/dbus-1/system-services which activate on a matching bus name request. This is handed off to systemd when its PID 1.

I've never been too sure on how all the interactions between DBus and systemd happens, nor have I been a proper "desktop" user for this stuff to be relevant to my needs.
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 08 September 2012, 17:15 GMT
I did it just for a curiosity question. Sure I will enable it.

I guess no, does not have stop-on-inactive.
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 08 September 2012, 17:27 GMT
mmmm, avahi also have a valid dbus-service

$ cat /usr/share/dbus-1/system-services/org.freedesktop.Avahi.service | grep Systemd
SystemdService=dbus-org.freedesktop.Avahi.service

$ cat /usr/share/dbus-1/system-services/org.freedesktop.colord-sane.service | grep Systemd
SystemdService=colord-sane.service

maybe such thing is intentional? who knows, the same thing happens with bluez, where SystemdService=dbus-org.bluez.service but such file does not exists, instead is an alias then when enabled is a symlink.
Comment by Gaetan Bisson (vesath) - Sunday, 09 September 2012, 15:56 GMT
Forgive my question Gerardo but I find it difficult to follow your discussion: in the end, would you have use for a "dbus-org.freedesktop.Avahi.service" ==> "avahi-daemon.service" symlink?
Comment by Gerardo Exequiel Pozzi (djgera) - Sunday, 09 September 2012, 17:51 GMT
  • Field changed: Status (Assigned → Waiting on Response)
I will ask to upstream, if this symlink is needed.
Comment by Gerardo Exequiel Pozzi (djgera) - Sunday, 09 September 2012, 19:11 GMT
  • Field changed: Category (Packages: Extra → Upstream Bugs)
  • Field changed: Severity (Medium → Low)
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 10 October 2012, 01:44 GMT
Looks like upstream devs does not care too much about mailing-list, there is no answer in one month.
@Gaetan: so if you want to close this task, do it ;)
Comment by Gaetan Bisson (vesath) - Wednesday, 10 October 2012, 02:13 GMT
Too bad they didn't care more...
Anyhow, thanks for your time on this!

Loading...