]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't retry connect() if doing FD passing
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 14 Mar 2018 17:27:49 +0000 (17:27 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 5 Jun 2018 16:30:57 +0000 (17:30 +0100)
commit7ef0471bf7143b8d07c8d88338ba2ba92501e41e
tree60629171a156aa189832bf0cebd59ec7059fe13d
parent30fb2276d88b275dc2aad6ddd28c100d944b59a5
qemu: don't retry connect() if doing FD passing

Since libvirt called bind() and listen() on the UNIX socket, it is
guaranteed that connect() will immediately succeed, if QEMU is running
normally. It will only fail if QEMU has closed the monitor socket by
mistake or if QEMU has exited, letting the kernel close it.

With this in mind we can remove the retry loop and timeout when
connecting to the QEMU monitor if we are doing FD passing. Libvirt can
go straight to sending the QMP greeting and will simply block waiting
for a reply until QEMU is ready.

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_process.c
tests/qemumonitortestutils.c