[CRIU] [PATCH 0/3] "post-dump" script action

Cyrill Gorcunov gorcunov at openvz.org
Mon Jul 15 03:53:01 EDT 2013


There might be a need to do some final action before dump
is complete, say to probe if restore on remote node processed
without problems and if something was wrong we're to rollback
the state of process tree back to live and continue execution
on the former node.

For this sake we introduce "post-dump" external script action,
which can exit with three codes

 1) "32" -- pointing that there error happened and the dumpee is
    to continue execution on the former node
 2) "0" -- all is ok, and dumpee can be killed
 3) anything else treated as error case, the dumpee is to continue
    execution and criu prints out error.

Thus we can run static/socket-tcp test as

	test/zdtm -d static/socket-tcp

and it'll pass without errors.

Please take a look, comments are welcome.

P.S. Andrew, to make zdtm handling criu exiting with post-dump code
deserves separate commit, so I defer it for a while.

Cyrill Gorcunov (3):
  dump: Introduce "post-dump" script action
  zdtm: Use "post-dump" script for "-d" option
  inet: Restore SO_REUSEADDR in case of rollback

 cr-dump.c         | 33 +++++++++++++++++++++++++++++++--
 include/sk-inet.h |  1 +
 sk-inet.c         |  1 +
 sk-tcp.c          |  7 +++++++
 test/post-dump.sh |  9 +++++++++
 test/zdtm.sh      |  3 ++-
 util.c            |  2 ++
 7 files changed, 53 insertions(+), 3 deletions(-)
 create mode 100755 test/post-dump.sh

-- 
1.8.1.4


More information about the CRIU mailing list