[PATCH v2 00/12] Implement keepalive protocol for libvirt RPC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patchset can also be found at

    https://gitorious.org/~jirka/libvirt/jirka-staging/commits/keepalive

This allows us to detect broken connections between server and client without
waiting for TCP timeout and dead deamon/client. By default a connection is
considered broken after about 30 seconds of no messages received from remote
party. After that period, the connection is automatically closed.

The main reason for implementing this is that peer-to-peer migration can now be
canceled when a connection between source and target breaks. Although this will
really work only after qemu fixes migrate_cancel command so that it doesn't
block when outgoing TCP buffers are full.

Version 2 adds virConnectIsAlive API and uses it to detect that a connection was
closed as a result of keepalive timeout.

The only patch that was changed in v2 is "Add keepalive support into
domain-events examples". All other patches are either new or without any change
from v1.

Jiri Denemark (12):
  Define keepalive protocol
  Implement common keepalive handling
  Introduce two public APIs for keepalive protocol
  Implement keepalive protocol in libvirt daemon
  Add support for non-blocking calls in client RPC
  Add support for async close of client RPC socket
  Implement keepalive protocol in remote driver
  Introduce virConnectIsAlive API
  Implement virConnectIsAlive in all drivers
  Add keepalive support into domain-events examples
  qemu: Add support for keepalive messages during p2p migration
  qemu: Cancel p2p migration when connection breaks

 .gitignore                                         |    1 +
 daemon/libvirtd.aug                                |    4 +
 daemon/libvirtd.c                                  |   11 +
 daemon/libvirtd.conf                               |   15 +
 daemon/remote.c                                    |   38 ++
 examples/domain-events/events-c/event-test.c       |   13 +-
 examples/domain-events/events-python/event-test.py |    5 +-
 include/libvirt/libvirt.h.in                       |    6 +
 po/POTFILES.in                                     |    1 +
 src/Makefile.am                                    |   13 +-
 src/driver.h                                       |   12 +
 src/esx/esx_driver.c                               |   18 +
 src/hyperv/hyperv_driver.c                         |   18 +
 src/libvirt.c                                      |  143 ++++++
 src/libvirt_internal.h                             |   10 +-
 src/libvirt_public.syms                            |    7 +
 src/libxl/libxl_driver.c                           |    8 +
 src/lxc/lxc_driver.c                               |    7 +
 src/openvz/openvz_driver.c                         |    7 +
 src/phyp/phyp_driver.c                             |   18 +
 src/qemu/libvirtd_qemu.aug                         |    2 +
 src/qemu/qemu.conf                                 |   16 +
 src/qemu/qemu_conf.c                               |   11 +
 src/qemu/qemu_conf.h                               |    3 +
 src/qemu/qemu_driver.c                             |    6 +
 src/qemu/qemu_migration.c                          |   49 ++-
 src/qemu/test_libvirtd_qemu.aug                    |    6 +
 src/remote/remote_driver.c                         |   48 ++
 src/remote/remote_protocol.x                       |    2 +-
 src/rpc/virkeepalive.c                             |  464 ++++++++++++++++++++
 src/rpc/virkeepalive.h                             |   58 +++
 src/rpc/virkeepaliveprotocol.x                     |    8 +
 src/rpc/virnetclient.c                             |  335 ++++++++++++--
 src/rpc/virnetclient.h                             |    6 +
 src/rpc/virnetserver.c                             |   10 +
 src/rpc/virnetserver.h                             |    2 +
 src/rpc/virnetserverclient.c                       |  126 +++++-
 src/rpc/virnetserverclient.h                       |    6 +
 src/test/test_driver.c                             |    6 +
 src/uml/uml_driver.c                               |    7 +
 src/vbox/vbox_tmpl.c                               |    6 +
 src/vmware/vmware_driver.c                         |    7 +
 src/xen/xen_driver.c                               |    8 +
 src/xenapi/xenapi_driver.c                         |   12 +
 44 files changed, 1483 insertions(+), 76 deletions(-)
 create mode 100644 src/rpc/virkeepalive.c
 create mode 100644 src/rpc/virkeepalive.h
 create mode 100644 src/rpc/virkeepaliveprotocol.x

-- 
1.7.6.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]