[CRIU] [PATCH 1/2] p.haul: rename dump_need_ps htype function

Nikita Spiridonov nspiridonov at odin.com
Tue Nov 17 02:16:15 PST 2015


Rename dump_need_ps to dump_need_page_server. Old name slightly
complicates code, 'ps' associates with processes, not page servers.

Signed-off-by: Nikita Spiridonov <nspiridonov at odin.com>
---
 phaul/iters.py         |    2 +-
 phaul/p_haul_docker.py |    2 +-
 phaul/p_haul_pid.py    |    2 +-
 phaul/p_haul_vz.py     |    2 +-
 phaul/service.py       |    4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/phaul/iters.py b/phaul/iters.py
index c3edca2..480ae4b 100644
--- a/phaul/iters.py
+++ b/phaul/iters.py
@@ -192,7 +192,7 @@ class phaul_iter_worker:
 
 		logging.info("Final dump and restore")
 
-		self.target_host.start_iter(self.htype.dump_need_ps())
+		self.target_host.start_iter(self.htype.dump_need_page_server())
 		self.img.new_image_dir()
 
 		logging.info("\tIssuing dump command to service")
diff --git a/phaul/p_haul_docker.py b/phaul/p_haul_docker.py
index b07ce2c..81e7533 100644
--- a/phaul/p_haul_docker.py
+++ b/phaul/p_haul_docker.py
@@ -156,5 +156,5 @@ class p_haul_type:
 		# to docker C/R API, then we can enable the pre-dump
 		return False
 
-	def dump_need_ps(self):
+	def dump_need_page_server(self):
 		return False
diff --git a/phaul/p_haul_pid.py b/phaul/p_haul_pid.py
index bc9c0cc..a53d594 100644
--- a/phaul/p_haul_pid.py
+++ b/phaul/p_haul_pid.py
@@ -100,5 +100,5 @@ class p_haul_type:
 	def can_pre_dump(self):
 		return True
 
-	def dump_need_ps(self):
+	def dump_need_page_server(self):
 		return True
diff --git a/phaul/p_haul_vz.py b/phaul/p_haul_vz.py
index 48f5e69..8aef6b7 100644
--- a/phaul/p_haul_vz.py
+++ b/phaul/p_haul_vz.py
@@ -250,7 +250,7 @@ class p_haul_type:
 	def can_pre_dump(self):
 		return True
 
-	def dump_need_ps(self):
+	def dump_need_page_server(self):
 		return True
 
 
diff --git a/phaul/service.py b/phaul/service.py
index 248c9fa..a51834a 100644
--- a/phaul/service.py
+++ b/phaul/service.py
@@ -70,10 +70,10 @@ class phaul_service:
 
 		logging.info("\tPage server started at %d", resp.ps.pid)
 
-	def rpc_start_iter(self, need_ps):
+	def rpc_start_iter(self, need_page_server):
 		self.dump_iter_index += 1
 		self.img.new_image_dir()
-		if need_ps:
+		if need_page_server:
 			self.start_page_server()
 
 	def rpc_end_iter(self):
-- 
1.7.1



More information about the CRIU mailing list