[CRIU] [PATCH v4 00/12] criu gc command implementation
Eugene Batalov
eabatalov89 at gmail.com
Sun Sep 11 10:14:39 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.
== V4 changes ==
- Return criu cmd return code, stdout, stderr as dict not as tuple
for better readability.
- Make common code paths for criu gc and criu gc with 'show' option
- Add details about the need to reuse of existing criu restorer
functions into commit message of "gc: implement link remaps deletion"
- Rebase to latest criu-dev
Eugene Batalov (11):
mount: save fs root fd of ps tree root mnt ns in its ns_id
files-reg: pass rmntns_root as parameter to clean_one_remap
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 test hooks stdout and stderr
zdtm: implement capturing of criu action 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 | 119 +++++++++++++++++++++++++
criu/crtools.c | 13 +++
criu/files-reg.c | 70 +++++++++++++--
criu/include/cr_options.h | 1 +
criu/include/crtools.h | 1 +
criu/include/files-reg.h | 1 +
criu/include/net.h | 1 +
criu/include/sk-inet.h | 2 +-
criu/mount.c | 7 +-
criu/net.c | 12 +++
criu/sk-tcp.c | 33 ++++++-
test/jenkins/criu-gc.sh | 10 +++
test/zdtm.py | 153 ++++++++++++++++++++++++++-------
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, 418 insertions(+), 43 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