[CRIU] [PATCH 0/4] sk-unix: Handle bindmounted dgram sockets

Cyrill Gorcunov gorcunov at openvz.org
Tue Aug 8 14:25:06 MSK 2017


We've discovered a situation where socket is bindmounted inside
container (mysql daemon uses /dev/log bindmounted) so restore
procedure may fail because sockets are opened later than mount
engine is trying to bindmount.

For this sake we detect such situstion on dump and use fdstore
engine to open a socket needed before mount call.

https://jira.sw.ru/browse/PSBM-69473

Cyrill Gorcunov (4):
  sk-unix: Save mnt_id for bindmounted entries
  mount: Export print_ns_root
  sk-unix: Handle bindmounted dgram sockets on restore
  test: mount -- Add bind-mount-unix

 criu/cr-dump.c                        |   3 +
 criu/include/mount.h                  |   1 +
 criu/include/sockets.h                |   3 +
 criu/mount.c                          |  10 ++-
 criu/sk-unix.c                        | 122 ++++++++++++++++++++++++++++++++++
 images/sk-unix.proto                  |   5 ++
 test/zdtm/static/Makefile             |   1 +
 test/zdtm/static/bind-mount-unix.c    | 106 +++++++++++++++++++++++++++++
 test/zdtm/static/bind-mount-unix.desc |   1 +
 9 files changed, 250 insertions(+), 2 deletions(-)
 create mode 100644 test/zdtm/static/bind-mount-unix.c
 create mode 100644 test/zdtm/static/bind-mount-unix.desc

-- 
2.7.5



More information about the CRIU mailing list