[libvirt] [PATCH 0/9] Implement keepalive protocol for libvirt RPC

Jiri Denemark jdenemar at redhat.com
Thu Sep 22 14:40:54 UTC 2011


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.

Jiri Denemark (9):
  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
  Add keepalive support into domain-events examples
  qemu: Add support for keepalive messages during p2p migration

 .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       |   11 +
 examples/domain-events/events-python/event-test.py |    3 +
 include/libvirt/libvirt.h.in                       |    5 +
 po/POTFILES.in                                     |    1 +
 src/Makefile.am                                    |   13 +-
 src/driver.h                                       |    9 +
 src/libvirt.c                                      |  107 +++++
 src/libvirt_internal.h                             |   10 +-
 src/libvirt_public.syms                            |    6 +
 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_migration.c                          |   10 +
 src/qemu/test_libvirtd_qemu.aug                    |    6 +
 src/remote/remote_driver.c                         |   30 ++
 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                             |  321 ++++++++++++--
 src/rpc/virnetclient.h                             |    5 +
 src/rpc/virnetserver.c                             |   10 +
 src/rpc/virnetserver.h                             |    2 +
 src/rpc/virnetserverclient.c                       |  126 +++++-
 src/rpc/virnetserverclient.h                       |    6 +
 31 files changed, 1254 insertions(+), 60 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




More information about the libvir-list mailing list