[Devel,libvzctl,2/2] scripts: vz-cpt.in -- Pass controllers to dump in options

Submitted by Cyrill Gorcunov on Aug. 2, 2016, 6:11 p.m.

Details

Message ID 1470161468-11537-3-git-send-email-gorcunov@openvz.org
State New
Series "Update scripts to fit CRIU-2.4"
Headers show

Commit Message

Cyrill Gorcunov Aug. 2, 2016, 6:11 p.m.
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@openvz.org>
---
 scripts/vz-cpt.in | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Patch hide | download patch | download mbox

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				\