On Thu, Apr 2, 2020, 04:53 Guido Günther <[email protected]> wrote: > control: reassign -1 systemd > control: retitle -1 systemd fails to restart socket unit of already > running service > > Dear systemd maintainers > On Wed, Apr 01, 2020 at 03:52:35PM +0200, Christian Ehrhardt wrote: > > Thanks, from that POV it makes sense. > > I'm not good at re-assigning debian bugs could one of you please do so > > to affect system as well? > > The tl;dr; version is that > > systemctl restart libvirtd.socket > > fails like > > Job failed. See "journalctl -xe" for details. > > Apr 02 09:29:57 foo systemd[1]: libvirtd.socket: Socket service > libvirtd.service already active, refusing. > Apr 02 09:29:57 foo systemd[1]: Failed to listen on Libvirt local > socket. > > if libvirtd.service is already running (libvirtd.socket has): > > [Socket] > ListenStream=/run/libvirt/libvirt-sock > Service=libvirtd.service > SocketMode=0666 > > and libvirtd.service is > https://salsa.debian.org/libvirt-team/libvirt/-/blob/debian/sid/src/remote/libvirtd.service.in > > The issue that this also happens in libvirt-daemon-system's postinst so > a restart of the socket unit does not seem to be possible. This could > be worked around by not restarting the socket units (changes in the > socket units seem to be picked up when restarting libvirtd.service > as well) but that would give problems when switching to socket only > activation. > > Since this looks like a common problem i'm likely missing something. >
I have always thought that every service should have Requires= all the sockets it uses. Does it fix the problem? Stooping only the socket should either crash the daemon or stop it gracefully first. I would think the latter is much better.

