[CRIU] [PATCH 0/7] mount: check mounts after restoring

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Feb 7 15:17:47 MSK 2019


Patches 1-4 do a minor cleanup of mounts code.

Patch 5 brings in the option --check-mounts on restore to check that at
the end of restore we have properly restored tree of mounts in each
mount namespace of the container.

We've seen cases of container migration passing fine without error, but
actually some mounts changed their attributes or even some new mounts
appeared. Potentially these "inaccuracies" during restore can accumulate
over several migrations of the same container, and we will finally see
unexpected crap in mounts and won't be able to find out the initial
problem. With --check-mounts we will catch initial problem and fix it.

These patch is based on my previous series as I need to reuse
call_helper_process(): "support restoring ghost files on readonly
mounts" https://patchwork.criu.org/series/2979/

Tested the series with base series applied:
https://travis-ci.org/Snorch/criu/builds/489957009

Based-on: <20181213090256.15492-1-ptikhomirov at virtuozzo.com>

Pavel Tikhomirov (7):
  mount: remove useless check in populate_mnt_ns
  ns: make rst_new_ns_id static
  ns/restore/image: do not read namespace images for non-namespaced case
  mount: rework mount tree build step on restore
  mount: check that mounts tree restored without any hidden problems
  rpc: Add interface for --check-mounts option
  zdtm: use --check-mounts by default

 criu/config.c             |   1 +
 criu/cr-restore.c         |   4 +
 criu/cr-service.c         |   3 +
 criu/crtools.c            |   3 +
 criu/include/cr_options.h |   1 +
 criu/include/mount.h      |   1 +
 criu/include/namespaces.h |   1 -
 criu/mount.c              | 279 ++++++++++++++++++++++++++++----------
 criu/namespaces.c         |   2 +-
 criu/net.c                |   3 +
 images/rpc.proto          |   1 +
 lib/c/criu.c              |  11 ++
 lib/c/criu.h              |   2 +
 test/zdtm.py              |   5 +
 14 files changed, 241 insertions(+), 76 deletions(-)

-- 
2.20.1



More information about the CRIU mailing list