From 9f5b2d64071ab8416487b5fc265908a511a9bf68 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Thu, 5 Feb 2015 13:51:23 +0000 Subject: Add support for unionfs Overlayfs is new in version 3.18 of the kernel, so add support for a different implementation of a union/overlay filesystem in order to allow morph to work on older kernels. --- morphlib/plugins/deploy_plugin.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'morphlib/plugins') diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index 4f78d126..a4895106 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -580,12 +580,12 @@ class DeployPlugin(cliapp.Plugin): msg='System unpacked at %(system_tree)s', system_tree=system_tree) - options = '-olowerdir=%s,upperdir=%s,workdir=%s' % \ - (system_tree, overlay_dir, work_dir) - morphlib.fsutils.mount(self.app.runcmd, - 'overlay-deploy-%s' % artifact.name, - deploy_tree, fstype='overlay', - options=options) + morphlib.fsutils.overlay_mount(self.app.runcmd, + 'overlay-deploy-%s' % + artifact.name, + deploy_tree, system_tree, + overlay_dir, work_dir, + self.app.settings) self.app.status( msg='Writing deployment metadata file') @@ -598,12 +598,12 @@ class DeployPlugin(cliapp.Plugin): sort_keys=True, encoding='unicode-escape') return deploy_tree except Exception: - shutil.rmtree(system_tree) - shutil.rmtree(overlay_dir) - shutil.rmtree(work_dir) if deploy_tree and os.path.exists(deploy_tree): morphlib.fsutils.unmount(self.app.runcmd, deploy_tree) shutil.rmtree(deploy_tree) + shutil.rmtree(system_tree) + shutil.rmtree(overlay_dir) + shutil.rmtree(work_dir) raise def run_deploy_commands(self, deploy_tempdir, env, artifact, root_repo_dir, -- cgit v1.2.1