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

Pavel Emelyanov xemul at virtuozzo.com
Tue Aug 8 15:12:20 MSK 2017


On 08/08/2017 02:25 PM, Cyrill Gorcunov wrote:
> 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.

The socket is bint-mount-ed, and the mountpoint is restored before the attempt
to open (bind/connect to?) the socket, so why does the latter fail?

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

Is this a special case of a more generic problem called "overmounted files"?

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



More information about the CRIU mailing list