Hi, On Thu, Apr 02, 2020 at 12:45:00PM +0200, Christian Ehrhardt wrote: > On Thu, Apr 2, 2020 at 10:54 AM Michael Biebl <[email protected]> wrote: > > > > I don't think this is going to work. > > > > You'll need to restart both the service and socket in the correct order, > > @Michael: > I have tried "systemctl restart service socket socket" before and it works. > But I was wondering if it might work just by accident, due to the service > being > not yet fully up when the sockets restart. And I was unsure if this > could be racy. > Are you saying this is "the right order" and this way around systemd > will take care > that service and sockets won't collide in a bad way? > > > i.e. > > > > systemctl restart libvirtd.service libvirtd.socket > > > > In that case - as initially suggested when I filed against debhelper - > at least the > ordering of dh_installsystemd would need to ensure that it does not order > everything alphabetically but instead start with the service followed by all > th > rest it picks up. > > Today: > $ grep Also /lib/systemd/system/libvirtd.service > Also=virtlockd.socket > Also=virtlogd.socket > Also=libvirtd.socket > Also=libvirtd-ro.socket > > And due to that > > dh_installsystemd -p libvirt-daemon-system --restart-after-upgrade > libvirtd.service > > Gets generated into postinst as: > > deb-systemd-invoke $_dh_action 'libvirtd-ro.socket' 'libvirtd.service' > 'libvirtd.socket' 'virtlockd.socket' 'virtlogd.socket' > > Triggering exactly that issue that we discuss here. > > If it would generate the following it would work (I tried) > deb-systemd-invoke $_dh_action 'libvirtd.service' 'libvirtd-ro.socket' > 'libvirtd.socket' 'virtlockd.socket' 'virtlogd.socket' > > @Michael: > - would you agree that due to the issues in discussion > dh_installsystem should change the order to always start with the > service? >
See 955542 , we can't get the order right with the current Also= parsing it seems. I'm also not sure if it's correct that Also= units are being restarted as well. Cheers, -- Guido

