[Devel] [PATCH libvzctl 2/2] scripts: vz-cpt.in -- Pass controllers to dump in options
Cyrill Gorcunov
gorcunov at openvz.org
Tue Aug 2 11:11:08 PDT 2016
Since criu 2.4 there is a support to skip unknown controllers
via command line options. So use this facility instead of
hardcoding names into CRIU.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
scripts/vz-cpt.in | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/scripts/vz-cpt.in b/scripts/vz-cpt.in
index b68ef3f..77a96e4 100755
--- a/scripts/vz-cpt.in
+++ b/scripts/vz-cpt.in
@@ -89,6 +89,26 @@ fi
mkdir -p $dumpdir &&
cg_dump_props $dumpdir &&
+#
+# There might be a number of other controllers created
+# on the host system, so specify which ones are to
+# be checkpointed.
+cg_controllers=$(cat <<EOF
+--cgroup-dump-controller hugetlb
+--cgroup-dump-controller perf_event
+--cgroup-dump-controller net_cls
+--cgroup-dump-controller freezer
+--cgroup-dump-controller ve
+--cgroup-dump-controller devices
+--cgroup-dump-controller name=systemd
+--cgroup-dump-controller cpuset
+--cgroup-dump-controller cpuacct,cpu
+--cgroup-dump-controller beancounter
+--cgroup-dump-controller memory
+--cgroup-dump-controller blkio
+EOF
+)
+
CRIU_LOGLEVEL=4
criu dump -v$CRIU_LOGLEVEL -o dump.log \
--file-locks \
@@ -103,6 +123,7 @@ criu dump -v$CRIU_LOGLEVEL -o dump.log \
--action-script $action_script \
-t $VE_PID \
-D $dumpdir \
+ $cg_controllers \
$nfs_actions \
$ext_mount_map \
$external \
--
2.7.4
More information about the Devel
mailing list