[CRIU] [PATCH 3/4] p.haul: fixup get_fs_receiver function in Virtuozzo module

Nikita Spiridonov nspiridonov at odin.com
Wed Nov 18 04:14:41 PST 2015


Since containers config parsed on destination as well as on
source, we can use _ct_priv variable to construct fs receiver,
don't need to parse global config anymore.

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

diff --git a/phaul/p_haul_vz.py b/phaul/p_haul_vz.py
index f2ec9a4..7470e97 100644
--- a/phaul/p_haul_vz.py
+++ b/phaul/p_haul_vz.py
@@ -209,13 +209,7 @@ class p_haul_type:
 		return None
 
 	def get_fs_receiver(self, fs_sk=None):
-		# Grab default private path from global config
-		with open(vz_global_conf) as ifd:
-			global_config = parse_vz_config(ifd.read())
-		default_private = expand_veid_var(global_config["VE_PRIVATE"],
-			self._ctid)
-		# Create receiver
-		fname_path = os.path.join(default_private, "root.hdd", "root.hds")
+		fname_path = os.path.join(self._ct_priv, "root.hdd", "root.hds")
 		return fs_haul_ploop.p_haul_fs_receiver(fname_path, fs_sk)
 
 	def restored(self, pid):
-- 
1.7.1



More information about the CRIU mailing list