[PATCH v2 0/6] Console coruption with two or more clients series

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

 



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 threads compete for the data from the PTY. This causes that each of the
consoles get scrambled and unusable.

These patches add mutual exclusion for opening consoles with two different
approaches and a option to terminate existing console streams.

A sample implementation is done using qemu driver, but i'll add more of them
if this will be OK. (They're basicaly the same as in qemu).

For convinience, to review these patches:

git checkout -b console_corruption 8d16201fe0e63afb5416a8eb7c6478f582ccccc0
git pull git://aeon.pipo.sk/libvirt.git console_dup

(The machine should be up most of time)

    Peter


Peter Krempa (6):
  Add flags for virDomainOpenConsole
  virsh: add support for VIR_DOMAIN_CONSOLE_FORCE flag
  fdstream: Emit stream abort callback even if poll() doesnt.
  fdstream: Add internal callback on stream close
  util: Add helpers for safe domain console operations
  qemu: Add ability to abort existing console while creating new one

 configure.ac                   |   37 +++-
 include/libvirt/libvirt.h.in   |   12 +-
 src/Makefile.am                |    5 +-
 src/fdstream.c                 |   95 +++++++++-
 src/fdstream.h                 |   11 +
 src/libvirt_private.syms       |    6 +
 src/qemu/qemu_domain.c         |    5 +
 src/qemu/qemu_domain.h         |    3 +
 src/qemu/qemu_driver.c         |   21 ++-
 src/util/domain_safe_console.c |  399 ++++++++++++++++++++++++++++++++++++++++
 src/util/domain_safe_console.h |   28 +++
 tools/console.c                |    5 +-
 tools/console.h                |    3 +-
 tools/virsh.c                  |   18 ++-
 14 files changed, 614 insertions(+), 34 deletions(-)
 create mode 100644 src/util/domain_safe_console.c
 create mode 100644 src/util/domain_safe_console.h

-- 
1.7.3.4

--
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]