[CRIU] [PATCH v3 00/11] criu gc command implementation

Eugene Batalov eabatalov89 at gmail.com
Wed Aug 10 12:12:44 PDT 2016


gc is a new CRIU command. Its aim is to remove helper objects
needed for restore that were left in the system after dump was performed.
Its main use case is to cleanup on node where dump was
performed but restore isn't planned.
Dumped ps tree should be dead on criu gc invocation.

CRIU gc accepts dump dir path as an input and removes:
1. Link remaps created for ps tree
2. Netfilter rules that drop ps tree tcp packets
Currently this is all that CRIU dump leaves in the system

--show option changes gc command behavior. It only
shows what was left in the system without objects removal.

== V1 changes ==
- Fix python lint errors in zdtm.py

== V2 changes ==
- Extended criu gc command help message
- Extended patch set description

== V3 changes ==
- Removed addition of host flavor to unlink_regular00 test desc file.
  I've tested criu gc with recent criu-dev commit
  that fixes unlink_regular00 zdtm test. Test fails
  when started with host flavor.
  criu doesn't dump filesystems if ps tree
  has no unshared mount ns. Thus criu doesn't restore
  contents of tmpfs on gc and gc fails because it can't
  remove garbage from this tmpfs.
  It's like running criu gc/restore on ps tree fs
  with all files deleted - this should fail.
- Rebased on latest criu-dev HEAD.

Eugene Batalov (10):
  mount: save fs root fd of ps tree root mnt ns in its ns_id
  gc: implement link remaps deletion
  gc: implement link remaps show
  gc: implement unlocking of tcp connections
  gc: implement locked tcp connections show
  zdtm: implement capturing of criu action stdout and stderr
  zdtm: implement capturing of test hooks stdout and stderr
  zdtm: extract cr and state checking logic into function
  zdtm: implement criu gc tests
  jenkins: add script to run all gc aware tests

Maxim Kuzmin (1):
  gc: mock implementation of new gc command

 criu/Makefile.crtools                  |   1 +
 criu/cr-gc.c                           | 149 +++++++++++++++++++++++++++++++++
 criu/crtools.c                         |  13 +++
 criu/files-reg.c                       |  75 +++++++++++++++--
 criu/include/cr_options.h              |   1 +
 criu/include/crtools.h                 |   1 +
 criu/include/files-reg.h               |   2 +
 criu/include/net.h                     |   1 +
 criu/include/sk-inet.h                 |   3 +-
 criu/mount.c                           |   7 +-
 criu/net.c                             |  12 +++
 criu/sk-tcp.c                          |  47 ++++++++++-
 test/jenkins/criu-gc.sh                |  10 +++
 test/zdtm.py                           | 140 +++++++++++++++++++++++++------
 test/zdtm/static/mntns_link_remap.hook |  10 +++
 test/zdtm/static/socket-tcp.hook       |   9 ++
 test/zdtm/static/socket-tcp6.hook      |   9 ++
 test/zdtm/static/unlink_regular00.hook |   9 ++
 18 files changed, 462 insertions(+), 37 deletions(-)
 create mode 100644 criu/cr-gc.c
 create mode 100755 test/jenkins/criu-gc.sh
 create mode 100755 test/zdtm/static/mntns_link_remap.hook
 create mode 100755 test/zdtm/static/socket-tcp.hook
 create mode 100755 test/zdtm/static/socket-tcp6.hook
 create mode 100755 test/zdtm/static/unlink_regular00.hook

-- 
1.9.1



More information about the CRIU mailing list