[CRIU] [PATCH p.haul 1/2] p.haul: specify freezer cgroup for predump and dump requests in vz module

Nikita Spiridonov nspiridonov at virtuozzo.com
Mon Jun 13 01:00:47 PDT 2016


Specify freezer cgroup for predump and dump rpc requests for
Virtuozzo containers.

Signed-off-by: Nikita Spiridonov <nspiridonov at virtuozzo.com>
---
 phaul/p_haul_vz.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/phaul/p_haul_vz.py b/phaul/p_haul_vz.py
index c65a7f0..97c2bec 100644
--- a/phaul/p_haul_vz.py
+++ b/phaul/p_haul_vz.py
@@ -123,6 +123,8 @@ class p_haul_type:
 
 	def adjust_criu_req(self, req):
 		"""Add module-specific options to criu request"""
+
+		# Specify dump specific options
 		if req.type == pycriu.rpc.DUMP:
 
 			# Specify root fs
@@ -138,6 +140,11 @@ class p_haul_type:
 			# Increase ghost-limit up to 50Mb
 			req.opts.ghost_limit = 50 << 20
 
+		# Specify freezer cgroup for both predump and dump requests
+		if req.type == pycriu.rpc.PRE_DUMP or req.type == pycriu.rpc.DUMP:
+			req.opts.freeze_cgroup = \
+				"/sys/fs/cgroup/freezer/{0}/".format(self._ctid)
+
 	def root_task_pid(self):
 		path = "/var/run/ve/{0}.init.pid".format(self._ctid)
 		with open(path) as pidfile:
-- 
1.7.1



More information about the CRIU mailing list