[CRIU] p.haul: ignore existing old/obsoleted active delta files for ploop disks

Submitted by Nikita Spiridonov on July 1, 2016, 1:08 p.m.


Message ID 1467378491-432560-1-git-send-email-nspiridonov@virtuozzo.com
State New
Series "p.haul: ignore existing old/obsoleted active delta files for ploop disks"
Headers show

Commit Message

Nikita Spiridonov July 1, 2016, 1:08 p.m.
Ease ploop disks check on destination side - don't fail if
old/obsoleted active delta files exist during migration of Virtuozzo
containers. ploop library ignore such files and overwrite them.

This is needed for migration over existing directory. In this mode
vzmigrate reuse existing on destination static data of container
left there by previously failed migration runs.

Signed-off-by: Nikita Spiridonov <nspiridonov@virtuozzo.com>
 phaul/fs_haul_ploop.py |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/phaul/fs_haul_ploop.py b/phaul/fs_haul_ploop.py
index b79fbf1..79a74a9 100644
--- a/phaul/fs_haul_ploop.py
+++ b/phaul/fs_haul_ploop.py
@@ -179,15 +179,12 @@  class p_haul_fs_receiver:
 			logging.info("\t`- %s", delta[0])
 	def __check_delta(self, delta_path):
-		"""Check delta file don't exist and parent directory exist"""
+		"""Check parent directory of delta exist"""
 		delta_dir = os.path.dirname(delta_path)
 		if not os.path.isdir(delta_dir):
 			raise Exception("{0} directory missing".format(delta_dir))
-		if os.path.isfile(delta_path):
-			raise Exception("{0} already exist".format(delta_path))
 class delta_receiver(threading.Thread):
 	def __init__(self, delta_path, delta_fd):


Pavel Emelyanov July 15, 2016, 6:02 p.m.