[PATCH] remote: systemd: Remove unix sockets from filesystem when disabling a '.socket' unit

Michal Prívozník mprivozn at redhat.com
Tue Jan 18 15:01:18 UTC 2022

On 1/18/22 15:56, Peter Krempa wrote:
> On Tue, Jan 18, 2022 at 15:51:21 +0100, Michal Prívozník wrote:
>> On 1/18/22 15:38, Peter Krempa wrote:
> [...]
>>> diff --git a/src/remote/libvirtd.socket.in b/src/remote/libvirtd.socket.in
>>> index 85b4aa800a..0f349656f5 100644
>>> --- a/src/remote/libvirtd.socket.in
>>> +++ b/src/remote/libvirtd.socket.in
>>> @@ -9,6 +9,7 @@ Before=@service at .service
>>>  ListenStream=@runstatedir@/libvirt/@sockprefix at -sock
>>>  Service=@service at .service
>>>  SocketMode=@mode@
>>> +RemoveOnStop=yes
>> I beg your pardon? Systemd leaves a stale socket behind? Isn't this
>> something that systemd needs to fix?
> Well, for that exact reason, they provide a config setting in the unit
> file that instruts systemd to delete the socket file when the socket
> unit is stopped, and also the exact reason I'm enabling that setting.

That's one of the worst possible defaults I've sever seen. If anything,
units should have been given an option to opt out, not opt in. But
fixing bugs in their respective components instead of libvirt is what we
do (I'm looking at you glib).

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>


More information about the libvir-list mailing list