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
It turns out it will do this in postinst now: invoke restart virtlogd.socket
if [ -n $2 ]
deb-systemd-
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: daemon- system --restart- after-upgrade libvirtd.service daemon- system --no-restart- on-upgrade $(LIBVIRT_ SYSTEM_ SERVICES)
1. dh_systemd_start -p libvirt-
2. dh_systemd_start -p libvirt-
#2 follows the --no-restart- on-upgrade policy for all services: invoke start 'virtlockd- admin.socket' 'virtlockd.service' 'virtlockd.socket' 'virtlogd- admin.socket' 'virtlogd.service' 'virtlogd.socket'
deb-systemd-
But #1 seems to pull in all that are required: virtlogd. socket virtlockd. socket
From the top of libvirtd.service:
Requires=
Requires=
And the call it generates is: invoke restart 'libvirtd.service' 'virtlockd.socket' 'virtlogd.socket'
deb-systemd-
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