You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit df4ffed
Browse filesBrowse the repository at this point in the historyBrowse files
libvirt: Retry virsh when the session daemon is restarting
CI intermittently fails bcvk libvirt commands with "Failed to connect
socket to '/run/user/1001/libvirt/libvirt-sock': No such file or
directory" (bootc-dev/bootc#1843), typically right after a step that
used no libvirt for two minutes, such as creating a base disk.
The libvirt client auto-spawns the qemu:///session daemon with
--timeout=120. When that daemon exits on idle it removes its socket
first and releases its pidfile only after its drivers shut down. A
client connecting in that window spawns a new daemon, which exits at
once because the pidfile is still held, then waits five seconds for a
socket nobody will create.
A connection failure means virsh never ran its command, so it is safe
to run it again; the retry spawns the daemon anew once the old one is
gone. Route every virsh invocation through one VirshCommand type that
does that for session connections, with a bounded backoff. It doesn't
deref to Command, so a call chain can't bypass the retry.
Generated-by: AI
Signed-off-by: Colin Walters <walters@verbum.org>
0 commit comments