[CRIU] [PATCH 1/3] dump: Introduce "post-dump" script action

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


This is usefull if one needs to do some final action before checkpoint
is complete. For example in case of online migration one may provide
a script which would check the restore procedure on remote note
ended without errors, thus the script returns zero code and criu
simply kills running instance of application.

In turn, if migration failed, the script can return nonzero code
and criu won't kill the application but continue its execution
instead.

There are two kind of non-zero code recognized:

 1) Code with value 32 tells criu to drop repair mode from
    tcp connections and continue execution of a program, but
    criu itself exits with zero code, iow like in case of
    successed checkpoint procedure

 2) Any other non-zero code treated as error case, criu exits
    reporting error happened during checkpoint and continue
    execution of a dumpee.

https://bugzilla.openvz.org/show_bug.cgi?id=2583

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-dump.c | 33 +++++++++++++++++++++++++++++++--
 util.c    |  2 ++
 2 files changed, 33 insertions(+), 2 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dump-Introduce-post-dump-script-action.patch
Type: text/x-patch
Size: 1699 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130715/a72efbc2/attachment.bin>


More information about the CRIU mailing list