[Pkg-libvirt-maintainers] Bug#1149602: systemctl restart libvirtd.service leaves RPC socket missing while is-active still reports active
Steve Newcomb
srn at coolheads.com
Thu Oct 1 14:02:25 BST 2026
Package: libvirt-daemon-system
Version: 11.3.0-3+deb13u3
Severity: normal
X-Debbugs-Cc: srn at coolheads.com
libvirtd on trixie is split into libvirtd.service plus three separate
socket units: libvirtd.socket, libvirtd-ro.socket, and
libvirtd-admin.socket. Running the seemingly obvious, natural command to
restart libvirtd after a config change --
systemctl restart libvirtd
# or: systemctl restart libvirtd.service
-- restarts the daemon process, but does NOT recreate
/run/libvirt/libvirt-sock. `systemctl is-active libvirtd` nonetheless
reports "active" immediately afterward, giving no indication that
anything is wrong. Only when actually trying to use libvirt (`virsh list`,
virt-manager, etc. against qemu:///system) does the failure become
visible, as a connection error with no obvious link back to "I just
restarted the service".
Steps to reproduce:
1. Have libvirtd running normally (`virsh list` works).
2. `systemctl restart libvirtd.service`
3. `systemctl is-active libvirtd` -> reports "active".
4. `virsh list` (or any other qemu:///system client) -> fails to connect;
`ls -la /run/libvirt/libvirt-sock*` shows the socket is gone.
Fix / workaround: restart the socket units together with the service:
systemctl stop libvirtd.service libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
systemctl start libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
(libvirtd.service itself then starts on demand via socket activation.)
I'm not asking for the socket-activation split itself to change -- that's
presumably intentional upstream design -- but the complete silence from
`systemctl is-active` is a real footgun: the single most natural command
an administrator would run after editing libvirtd's config silently
breaks the daemon's reachability with zero diagnostic signal. Requesting
this be documented prominently (man page and/or README.Debian), e.g. "to
restart libvirtd, use `systemctl restart libvirtd.socket
libvirtd-ro.socket libvirtd-admin.socket libvirtd.service` together, not
the service alone" -- or, if feasible, that the service unit itself be
given a dependency/ordering relationship that makes a bare
`restart libvirtd.service` correctly cycle its sockets too.
-- System Information:
Debian Release: 13.7
APT prefers stable
Architecture: amd64
Kernel: Linux moe 6.12.107+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.107-1 (2026-08-29) x86_64 (SMP)
Versions of relevant packages:
ii libvirt-daemon-system 11.3.0-3+deb13u3
ii libvirt-daemon 11.3.0-3+deb13u3
ii systemd 257.13-1~deb13u1
More information about the Pkg-libvirt-maintainers
mailing list