unable to stop avahi-daemon (dbus always restarts it)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
avahi (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When avahi-daemon is stopped, dbus always revives it.
Steps to reproduce:
1. sudo systemctl stop avahi-daemon.socket
2. sudo systemctl stop avahi-daemon.
3. ps aux| grep avahi # should return nothing
Currently, dbus revives it right away as shown in syslog:
Aug 23 15:17:22 simon-vm avahi-daemon[4036]: Got SIGTERM, quitting.
Aug 23 15:17:22 simon-vm avahi-daemon[4036]: Leaving mDNS multicast group on interface ens3.IPv6 with address 2001:470:
Aug 23 15:17:22 simon-vm avahi-daemon[4036]: Leaving mDNS multicast group on interface ens3.IPv4 with address 172.24.26.52.
Aug 23 15:17:22 simon-vm avahi-daemon[4036]: avahi-daemon 0.6.32-rc exiting.
Aug 23 15:17:22 simon-vm dbus[1647]: [system] Activating via systemd: service name='org.
Aug 23 15:17:22 simon-vm systemd[1]: Stopping Avahi mDNS/DNS-SD Stack...
Aug 23 15:17:22 simon-vm systemd[1]: Stopped Avahi mDNS/DNS-SD Stack.
Aug 23 15:17:22 simon-vm systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
Aug 23 15:17:22 simon-vm systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
This automatic revival defeats the purpose of the up script [*] to deactivate avahi when .local is a regular DNS zone (not mDNS). This also goes against the principle of least surprise.
*: /etc/network/
Additional information:
# lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04
# apt-cache policy avahi-daemon dbus systemd
avahi-daemon:
Installed: 0.6.32~
Candidate: 0.6.32~
Version table:
*** 0.6.32~
500 http://
100 /var/lib/
dbus:
Installed: 1.10.6-1ubuntu3
Candidate: 1.10.6-1ubuntu3
Version table:
*** 1.10.6-1ubuntu3 500
500 http://
100 /var/lib/
systemd:
Installed: 229-4ubuntu7
Candidate: 229-4ubuntu7
Version table:
*** 229-4ubuntu7 500
500 http://
100 /var/lib/
229-4ubuntu4 500
500 http://
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: avahi-daemon 0.6.32~
ProcVersionSign
Uname: Linux 4.4.0-36-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Tue Aug 23 15:09:40 2016
InstallationDate: Installed on 2016-08-22 (0 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Beta amd64 (20160819)
ProcEnviron:
LANGUAGE=en_CA:en
TERM=xterm
PATH=(custom, no user)
LANG=en_CA.UTF-8
SHELL=/bin/bash
SourcePackage: avahi
UpgradeStatus: No upgrade log present (probably fresh install)
The d-bus activation thing is a quirk of systemd, it actually tells you when you run stop. You need to use disable (as well as stop) to both stop it and prevent re-activation.
root@ubuntu:~# systemctl stop avahi-daemon service, but it can still be activated by: daemon. socket
Warning: Stopping avahi-daemon.
avahi-
You're right about the ifupdown script, though.
The good news on the one hand is that upstream hopefully soon nss-mdns will be improved to no longer need this trick.