[CRIU] [PATCH p.haul] Fix rollback for Virtuozzo container migration in restart mode

Nikita Spiridonov nspiridonov at virtuozzo.com
Wed Aug 24 03:37:58 PDT 2016


Fix rollback for Virtuozzo container migration in restart mode -
fail migration if can't start container on target host. Without
current fix container migrate successfully but stay in stopped
state.

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

diff --git a/phaul/p_haul_vz.py b/phaul/p_haul_vz.py
index 7db51e7..8e56745 100644
--- a/phaul/p_haul_vz.py
+++ b/phaul/p_haul_vz.py
@@ -304,6 +304,8 @@ class p_haul_type:
 			stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 		proc_output = proc.communicate()[0]
 		util.log_subprocess_output(proc_output)
+		if proc.returncode != 0:
+			raise Exception("Start failed ({0})".format(proc.returncode))
 		self._fs_mounted = True
 
 	def stop(self, umount):
-- 
1.7.1



More information about the CRIU mailing list