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