Bug 631271 - avahi-daemon started when it should not be
Summary: avahi-daemon started when it should not be
Alias: None
Product: Fedora
Classification: Fedora
Component: avahi
Version: 14
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
: 634532 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2010-09-07 17:46 UTC by Tom Horsley
Modified: 2011-03-08 23:19 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-03-08 23:19:57 UTC
Type: ---

Attachments (Terms of Use)
[PATCH] DBus activate an alias which can be disabled (929 bytes, patch)
2010-09-16 11:00 UTC, Michal Schmidt
no flags Details | Diff

Description Tom Horsley 2010-09-07 17:46:21 UTC
Description of problem:
See this thread in the fedora test list:


Apparently creating a client callback for avahi causes the avahi-daemon to
be started under systemd, this was not the case previously.

I have confirmed that my fedora 13 libvirtd.conf file does not modify
the mdns_adv setting, but I don't get avahi-daemon running on f13.

On f14 (with systemd) I need to uncomment the mdns_adv=0 line to prevent
avahi-daemon from starting (event though it is disabled in chkconfig, it
starts anyway and the start time and pid seems to indicate it starts
immediately after libvirtd).

Version-Release number of selected component (if applicable):
systemd 9-3

How reproducible:
every time

Steps to Reproduce:
1.see above
Actual results:
avahi-daemon running

Expected results:
No avahi-daemon

Additional info:

Comment 1 Lennart Poettering 2010-09-07 17:51:09 UTC
Avahi nowadays uses bus activation, which causes this.

Comment 2 Nicholas Miell 2010-09-07 20:56:19 UTC
Previously, libvirtd had a soft dependency on avahi (by passing AVAHI_CLIENT_NO_FAIL to avahi_client_new), and it would operate with or without a running avahi daemon.

The change to bus activation results in a hard dependency on avahi, which represents a regression over the previous feature set.

Comment 3 Stefan Becker 2010-09-11 15:43:04 UTC
It's not only libvirtd that triggers avahi daemon startup. I don't have libvirtd installed on this laptop but it still activated, probably by the KDE session.

But no matter what, there is still a regression: with systemd it is no longer possible to permanently disable avahi-daemon. If I understand the man page correctly then the following should work:

# systemctl disable --global avahi-daemon.service avahi-daemon.socket
Couldn't find avahi-daemon.service.

Comment 4 Michal Schmidt 2010-09-16 10:34:34 UTC
*** Bug 634532 has been marked as a duplicate of this bug. ***

Comment 5 Michal Schmidt 2010-09-16 10:54:35 UTC
The bug is that /usr/share/dbus-1/system-services/org.freedesktop.Avahi.service directly references avahi-daemon.service:

Instead avahi-daemon.service should define an installable Alias and the D-Bus service file should reference that.

Comment 6 Michal Schmidt 2010-09-16 11:00:11 UTC
Created attachment 447717 [details]
[PATCH] DBus activate an alias which can be disabled

This should fix it, but I haven't tested it yet.

Comment 7 Michal Schmidt 2010-09-16 11:12:53 UTC
Tested it now and it works as expected.
systemctl {en,dis}able avahi-daemon.service now have the desired effect.

Comment 8 Stefan Becker 2010-09-16 19:02:49 UTC
Confirmed. With the patch apply "disable" works and avahi is no longer started during startup.

Comment 9 Lennart Poettering 2011-03-08 23:19:57 UTC
A patch like this one was applied a while back. Thanks putting this together, Michal!

Note You need to log in before you can comment on or make changes to this bug.