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

[libvirt] [PATCH 00/10] Console coruption with two or more clients series



This series fixes anoying console corruption if two clients try to connect
at same time to the console. The current state of this is, that two/more
of libvirt iohelpers are spawned on the same time that compete for data 
from the pty. This causes that each of the consoles get scrambled and 
unusable.

Patches
  fdstream: Emit stream abort callback even if poll() doesnt.
  virnetclientstream: Propagate stream error messages to callback
  daemon: Subscribe the stream event callback for error events.

add the ability to abort a stream from the daemon side.

  fdstream: Add internal function to check if a fdstream is open
This patch adds a helper function that checks internally if a fdstream 
is open and working.

  virsh: fix console stream error reporting
  Add flags for virDomainOpenConsole
  virsh: add support for VIR_DOMAIN_CONSOLE_FORCE flag
This patches add instrumentation to virsh that supports the new ability to 
abort streams from the daemon side and adapts the console callback to handle 
this. These patches also add a new flag set for virDomainOpenConsole API
call that allow users to control the if the existing console connection should
be left in place or killed in favor of the new one

  qemu: Add ability to abort existing console while creating new one
  lxc: Add ability to abort existing console when creating a new one
  uml: Add ability to abort existing console when creating a new one
These patches modify the hypervisor drivers so that they are aware of existing
console connections and refuse to create a new one (or kill the old).

The xen driver also supports console in a similar way like the previously
mentioned drivers, but lacks the means to store a stream reference
permanently. I'll look in if it's possible to modify this driver to support
this new functionality.

For convinience, to review these patches:

git checkout -b console_corruption 33b55fd85ae5435bda53c3cfcbe1385074befd01
git pull git://aeon.pipo.sk/libvirt.git console_corruption

Peter

Peter Krempa (10):
  fdstream: Emit stream abort callback even if poll() doesnt.
  virnetclientstream: Propagate stream error messages to callback
  daemon: Subscribe the stream event callback for error events.
  fdstream: Add internal function to check if a fdstream is open
  virsh: fix console stream error reporting
  Add flags for virDomainOpenConsole
  virsh: add support for VIR_DOMAIN_CONSOLE_FORCE flag
  qemu: Add ability to abort existing console while creating new one
  lxc: Add ability to abort existing console when creating a new one
  uml: Add ability to abort existing console when creating a new one

 daemon/stream.c              |    2 +-
 include/libvirt/libvirt.h.in |   12 +++++++-
 src/fdstream.c               |   61 ++++++++++++++++++++++++++++++++++++++---
 src/fdstream.h               |    2 +
 src/libvirt_private.syms     |    1 +
 src/lxc/lxc_driver.c         |   28 ++++++++++++++++++-
 src/qemu/qemu_domain.c       |    3 ++
 src/qemu/qemu_domain.h       |    2 +
 src/qemu/qemu_driver.c       |   23 +++++++++++++++-
 src/rpc/virnetclientstream.c |   12 +++++---
 src/uml/uml_driver.c         |   28 ++++++++++++++++++-
 tools/console.c              |   27 ++++++++++++------
 tools/console.h              |    2 +-
 tools/virsh.c                |   18 +++++++++---
 14 files changed, 192 insertions(+), 29 deletions(-)

-- 
1.7.3.4


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