Comment 10 for bug 1786179

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

It turns out it will do this in postinst now:
 if [ -n $2 ]
  deb-systemd-invoke restart virtlogd.socket

Ignoring all sorts of --no-restart-on-upgrade as the above very literally sounds like "restart on upgrade"

In d/rules we have 2x dh_systemd_start:
1. dh_systemd_start -p libvirt-daemon-system --restart-after-upgrade libvirtd.service
2. dh_systemd_start -p libvirt-daemon-system --no-restart-on-upgrade $(LIBVIRT_SYSTEM_SERVICES)

#2 follows the --no-restart-on-upgrade policy for all services:
  deb-systemd-invoke start 'virtlockd-admin.socket' 'virtlockd.service' 'virtlockd.socket' 'virtlogd-admin.socket' 'virtlogd.service' 'virtlogd.socket'

But #1 seems to pull in all that are required:
From the top of libvirtd.service:
  Requires=virtlogd.socket
  Requires=virtlockd.socket

And the call it generates is:
  deb-systemd-invoke restart 'libvirtd.service' 'virtlockd.socket' 'virtlogd.socket'

This restarts virtlogd.service:
$systemctl status virtlogd.service | grep Active; deb-systemd-invoke restart 'virtlogd.socket'; systemctl status virtlogd.service | grep Active
   Active: active (running) since Thu 2018-08-09 12:40:40 UTC; 5min ago
   Active: active (running) since Thu 2018-08-09 12:46:36 UTC; 20ms ago

I'm not entirely sure what the bug here is, either
- why is virtlogd.socket listed on this line - probably the requires
or
- why is restarting the socket restarting the service - probably because it knows sockets can only be restarted when services are down