The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1075
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
From b9ee6643cba207223a035f822d3fabd3eb2c8370 Mon Sep 17 00:00:00 2001 From: Tycho Andersen <tycho.ander...@canonical.com> Date: Wed, 6 Jul 2016 23:45:15 +0000 Subject: [PATCH] c/r: add support for CRIU's --action-script Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- src/lxc/criu.c | 8 ++++++++ src/lxc/lxccontainer.h | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/lxc/criu.c b/src/lxc/criu.c index a1b7d40..94b9ce4 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -185,6 +185,9 @@ static void exec_criu(struct criu_opts *opts) if (opts->user->verbose) static_args++; + if (opts->user->action_script) + static_args += 2; + ret = snprintf(log, PATH_MAX, "%s/%s.log", opts->user->directory, opts->action); if (ret < 0 || ret >= PATH_MAX) { ERROR("logfile name too long\n"); @@ -235,6 +238,11 @@ static void exec_criu(struct criu_opts *opts) if (opts->user->verbose) DECLARE_ARG("-vvvvvv"); + if (opts->user->action_script) { + DECLARE_ARG("--action-script"); + DECLARE_ARG(opts->user->action_script); + } + if (strcmp(opts->action, "dump") == 0 || strcmp(opts->action, "pre-dump") == 0) { char pid[32], *freezer_relative; diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h index ecc66e2..bde4912 100644 --- a/src/lxc/lxccontainer.h +++ b/src/lxc/lxccontainer.h @@ -891,6 +891,11 @@ struct migrate_opts { * won't if e.g. you rsync the filesystems between two machines. */ bool preserves_inodes; + + /* Path to an executable script that will be registered as a criu + * "action script" + */ + char *action_script; }; /*!
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel