[CRIU] [PATCH v2 11/12] p.haul: add --skipowner flag on every vzctl action

Alexander Burluka aburluka at virtuozzo.com
Sat Apr 9 06:41:21 PDT 2016


It is necessary only on restoring operation on shared disks.
Signed-off-by: Alexander Burluka <aburluka at virtuozzo.com>
---
 phaul/p_haul_vz.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/phaul/p_haul_vz.py b/phaul/p_haul_vz.py
index c15c2a7..83c9050 100644
--- a/phaul/p_haul_vz.py
+++ b/phaul/p_haul_vz.py
@@ -179,7 +179,7 @@ class p_haul_type:
 			self.__setup_restore_extra_args(args_path, img, connection)
 			# Run vzctl restore
 			logging.info("Starting vzctl restore")
-			proc = subprocess.Popen([vzctl_bin, "--skiplock", "restore",
+			proc = subprocess.Popen([vzctl_bin, "--skipowner", "--skiplock", "restore",
 				self._ctid, "--dumpfile", img.image_dir()],
 				stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 			proc_output = proc.communicate()[0]
@@ -198,7 +198,7 @@ class p_haul_type:
 		logging.info("Mounting CT root to %s", self._ct_root)
 		logging.info("Running vzctl mount")
 		proc = subprocess.Popen(
-			[vzctl_bin, "--skiplock", "mount", self._ctid],
+			[vzctl_bin, "--skipowner", "--skiplock", "mount", self._ctid],
 			stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 		proc_output = proc.communicate()[0]
 		logging.info(proc_output)
@@ -210,7 +210,7 @@ class p_haul_type:
 			logging.info("Umounting CT root")
 			logging.info("Running vzctl umount")
 			proc = subprocess.Popen(
-				[vzctl_bin, "--skiplock", "umount", self._ctid],
+				[vzctl_bin, "--skipowner", "--skiplock", "umount", self._ctid],
 				stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 			proc_output = proc.communicate()[0]
 			logging.info(proc_output)
@@ -220,7 +220,7 @@ class p_haul_type:
 		logging.info("Starting CT")
 		logging.info("Running vzctl start")
 		proc = subprocess.Popen(
-			[vzctl_bin, "--skiplock", "start", self._ctid],
+			[vzctl_bin, "--skipowner", "--skiplock", "start", self._ctid],
 			stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 		proc_output = proc.communicate()[0]
 		logging.info(proc_output)
@@ -229,7 +229,7 @@ class p_haul_type:
 	def stop(self, umount):
 		logging.info("Stopping CT")
 		logging.info("Running vzctl stop")
-		args = [vzctl_bin, "--skiplock", "stop", self._ctid]
+		args = [vzctl_bin, "--skipowner", "--skiplock", "stop", self._ctid]
 		if not umount:
 			args.append("--skip-umount")
 		proc = subprocess.Popen(
-- 
1.8.3.1



More information about the CRIU mailing list