[CRIU] [PATCH 0/5 v2] A few fixes to c/r a docker container with a console

Andrei Vagin avagin at openvz.org
Tue Feb 7 00:43:26 PST 2017


From: Andrei Vagin <avagin at virtuozzo.com>

runc creates a pty pair from a container devpts, then bind-mounts
the slave into /dev/console and handles the master externally.

This series solve there problems:
* notify about abandoned master pty-s via rpc
* restore bind-mounted slave pty-s
* create a detached mount when a temporary directory can't be created

https://github.com/opencontainers/runc/issues/1202

v2: fix a bug in fdstore
    add more comments

Andrei Vagin (5):
  tty: notify about orphan tty-s via rpc
  fdstore: add a storage for file descriptors (v2)
  mount: create a slave pty if it has to be bind-mounted to somewhere
  mount: clone a mount namespace to open a detached mount
  zdtm: check a case when a slave pty is mounted to somewhere

 criu/Makefile.crtools             |   1 +
 criu/action-scripts.c             |  20 ++++++-
 criu/cr-restore.c                 |  30 ++++++++--
 criu/cr-service.c                 |  27 +++++++--
 criu/fdstore.c                    |  94 +++++++++++++++++++++++++++++
 criu/filesystems.c                |   2 +
 criu/include/action-scripts.h     |   6 +-
 criu/include/cr_options.h         |   1 +
 criu/include/fdstore.h            |  17 ++++++
 criu/include/servicefd.h          |   2 +
 criu/include/tty.h                |   3 +
 criu/mount.c                      |  19 +++++-
 criu/tty.c                        | 120 ++++++++++++++++++++++++++++++++++++--
 images/rpc.proto                  |   1 +
 test/zdtm/static/Makefile         |   3 +
 test/zdtm/static/pty-console.c    |   1 +
 test/zdtm/static/pty-console.desc |   1 +
 test/zdtm/static/pty01.c          |  14 +++++
 18 files changed, 339 insertions(+), 23 deletions(-)
 create mode 100644 criu/fdstore.c
 create mode 100644 criu/include/fdstore.h
 create mode 120000 test/zdtm/static/pty-console.c
 create mode 100644 test/zdtm/static/pty-console.desc

--
2.7.4



More information about the CRIU mailing list